Auto_Increment After deleted data from the table How can I reset the auto_increment of a field? I want it to start counting from 1 again after I delete all the data.
ALTER TABLE tablename AUTO_INCREMENT = 1;


See also the same question on stackoverflow.