reset auto increment integer in mysql
Because I use auto-increment integers in almost every table I can for the primary key, they tend to get very large very fast. This can sometimes be an annoying problem when I’m debugging an application or testing a mysql database query. They are resetable and it’s so much quicker to select from the database when you’re checking for id=3 or id=25 then id=305678.
The query to reset the auto increment primary id of your choosing is :
ALTER TABLE some_table AUTO_INCREMENT = 1;
It is also possible to set the next auto_increment number
You can do it like this :
SET insert_id=5;
Now your next mysql_insert_id() will be 5.