reset id auto increment after deleting a table row in phpmyadmin

Solutions on MaxInterview for reset id auto increment after deleting a table row in phpmyadmin by the best coders in the world

showing results for - "reset id auto increment after deleting a table row in phpmyadmin"
Angelo
21 Jan 2021
1SET @autoid :=0; 
2UPDATE table_name SET id = @autoid:=(@autoid+1);
3ALTER TABLE table_name AUTO_INCREMENT=1;