Created
December 22, 2014 01:15
-
-
Save imerr/d03015792792905bb69f to your computer and use it in GitHub Desktop.
reset autoincrement id
This file contains hidden or 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
| ALTER TABLE `x` DROP `id`; | |
| ALTER TABLE `x` AUTO_INCREMENT = 1; | |
| ALTER TABLE `x` ADD `id` int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment