Afdrukken
Categorie: MySQL
Hits: 2529

Reset auto increment in MySQL

 

MySQL (phpmyadmin)

reset the auto increment number of your database back into 1

ALTER TABLE Table_name AUTO_INCREMENT = 1;

 

You can also use:
Truncate `table_name`

This will clear data and reset the autoindex.

 

http://cookingprogrammers.blogspot.com/2008/03/mysql-to-reset-auto-increment-number.html