ALTER TABLE tablename AUTO_INCREMENT = value;
eg.
If I had a items table and I created a few new items and then deleted them, to set the auto increment value back to ‘100′ i would simply:
ALTER TABLE items AUTO_INCREMENT = 100;
ALTER TABLE tablename AUTO_INCREMENT = value;
ALTER TABLE items AUTO_INCREMENT = 100;
Kubernetes, often abbreviated as K8s , is an open-source platform designed to automate the deployment, scaling, and management of container...
3 comments:
Can you tell me how to reset the auto increment of all the tables in a database at a time
nice post, but no need to get the maximum values , it will set automatically you can get it from here
http://webobserve.blogspot.com/2011/02/reset-mysql-table-autoincrement.html
Thanks
Post a Comment