During development, usually we want to delete records from the table manually, then the tables auto-increment column remains where it was. We might want to reset the auto-increment value for the table.
For example, if you delete records with id's 7,8,9
Now when you insert through application, it inserts the new record starting at 10. But we want it to start at 7.
Use the following SQL to reset to a specific value
ALTER TABLE my_table AUTO_INCREMENT=7
If you want to delete all records from your table and restart auto-index at 1, then
TRUNCATE TABLE my_table