Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to reset the Auto increment in mysql

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 264
    Comment on it

    Hello Reader's! If you already using the Mysql then you have seen the ID with autoincrement always add up. Forevery new entery the ID will increase even if you drop the table. So if you want to reset this value you just have to run the mysql code below:-

    ALTER TABLE tablename AUTO_INCREMENT = 1
    

    The code above will again reset the value to 1 or if you want o start with any value then try code below:-

    ALTER TABLE tablename AUTO_INCREMENT = value;
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: