Answers for "how to reset table auto increment column id in mysql (phpmyadmin)"

SQL
1

mysql reset auto increment id

SET  @num := 0;

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

ALTER TABLE your_table AUTO_INCREMENT =1;
Posted by: Guest on June-10-2020
0

reset id auto increment after deleting a table row in phpmyadmin

SET @autoid :=0; 
UPDATE table_name SET id = @autoid:=(@autoid+1);
ALTER TABLE table_name AUTO_INCREMENT=1;
Posted by: Guest on January-27-2021

Code answers related to "how to reset table auto increment column id in mysql (phpmyadmin)"

Code answers related to "SQL"

Browse Popular Code Answers by Language