SELECT @max := MAX(ID)+ 1 FROM ABC;
PREPARE stmt FROM 'ALTER TABLE ABC AUTO_INCREMENT = ?';
EXECUTE stmt USING @max;
DEALLOCATE PREPARE stmt;
Last active
January 18, 2017 13:51
-
-
Save jkullick/55100ff5c8b891b19d9682f79a85700b to your computer and use it in GitHub Desktop.
Reset MySQL Auto Increment Value after Delete
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment