Skip to content

Instantly share code, notes, and snippets.

@rxgx
Created June 26, 2010 01:05
Show Gist options
  • Save rxgx/453658 to your computer and use it in GitHub Desktop.
Save rxgx/453658 to your computer and use it in GitHub Desktop.
Reset table IDs and AUTO_INCREMENT
ALTER TABLE `users` DROP `id`;
ALTER TABLE `users` AUTO_INCREMENT = 1;
ALTER TABLE `users` 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