Reset the auto increment number in a MySQL table

To reset the auto increment number in a MySQL table, simply run the following command:


ALTER TABLE table AUTO_INCREMENT=1

Replace the number 1 with the value you are wish to reset the auto increment number to. Substitute table with the table name you are modifying. If you leave the number 1, the table will reset the auto increment value to the next available number.

Leave a Reply