MySQL Change current auto-increment value

You can use the following SQL query to set the next value to be used by an auto-incrementing field in MySQL. Useful if you make a mistake and want to delete a value you just added without leaving a gap in the sequence numbers, or if you want to start with an index higher than 1.

ALTER TABLE tablename AUTO_INCREMENT = value;

links

social