tags:

views:

132

answers:

2

Hi, I was testing some data in my tables of my database, to see if there was any error, now I cleaned all the testing data, but my id (auto increment) does not start from 1 anymore, can (how do) I reset it ?

Sorry for any mistake in English, and thanks for the attention.

+5  A: 
ALTER TABLE `table_name` AUTO_INCREMENT=1
Sev
+2  A: 

ALTER TABLE xxx AUTO_INCREMENT =1; or clear your table by TRUNCATE

Chen