I want a query which can set an auto increment value in mysql database to 0.
In my case i want a column called "id" to be reset to 0.
ALTER TABLE some_table AUTO_INCREMENT=0
If you want to delete all records from your table and restart auto-index at 0, you might be tempted to run a DELETE query, followed by the above example, setting the auto increment value to 0. There is a shortcut, however:
TRUNCATE TABLE some_table