Let say you have a table called “my_table” with an auto-increment column called “id” and you want the id column to start counting from 1,2,3,… then use the following SQL queries.

SET  @num := 0;

UPDATE my_table SET id = @num := (@num+1);

ALTER TABLE my_table AUTO_INCREMENT =1;