DEV Community

Diego
Diego

Posted on

Set new number for autoincrement value in a MySQL table

If you want to reset the auto-increment number of a table to start it again with a new value, you have to launch this SQL:

ALTER TABLE my_table_name AUTO_INCREMENT=400;
Enter fullscreen mode Exit fullscreen mode

In this case, 400 is the value you want to be the new start value.

Top comments (0)