This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.codeandweb.com/babeledit |