How to Reset the AUTO_INCREMENT in MySQL using a simple SQL query

For example we have a table with a list of people and we have an ID column. We wanted to add a number to every row automatically, then we enabled AUTO_INCREMENT function for ID column. Now when we add a new person to the table it will automatically increment the number for each time on ID column. 
So let's say that we have a 10 people name in the table. And we have deleted one item/row or person from table and the next time when are trying to add anew person the id count will resume it will give a 11 for next person.
So for that we need to use a simple SQL query which will reset the ID count and next time it will add a 10 for next person in above example.

All i'm gonna to do is open up the phpMyAdmin, sign in using the username and password. Then select the database from left side and go to "SQL" tab from top bar.


Now in query box type the next query:
ALTER TABLE table_name AUTO_INCREMENT = 1
Change the "table_name" from above query to the table name you want to reset the AUTO_INCREMENT count and hit enter or press on "Go" button.
Web Hosting