MySQL Autoindex/Autoincrement

It is easy to create primary indices for tables with the use of auto increment. Normally, each new line gets a new number where the first one starts with 1. This means for a table with the column ID and auto increment on, the value of the cell is 1 in the first line, 2 in the second and so on.

What can I do to start a new table with index 50?

Change the next auto increment value

It may sounds simple to change the value for this, but PhpMyAdmin does not support this. You can find the value under the table (database statistic), but you can not change it with the GUI. For this we need a SQL statement:

For this simply change tabe_name with the name of your table.

(Visited 118 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *