u need to use the following command in an mysql terminal.
-- your_table: The table to modify
-- id: The id field/column to reset
SET @num := 0;
UPDATE your_table SET id = @num := (@num+1);
ALTER TABLE your_table AUTO_INCREMENT =1;
(This code is taken from
http://www.daftspunk.com/code/how-to-reset-table-id-fields-1234-using-mysql.html)
-- your_table: The table to modify
-- id: The id field/column to reset
SET @num := 0;
UPDATE your_table SET id = @num := (@num+1);
ALTER TABLE your_table AUTO_INCREMENT =1;
(This code is taken from
http://www.daftspunk.com/code/how-to-reset-table-id-fields-1234-using-mysql.html)
Comments