Mysql – Auto Increment Custom Start Value

If you want to have an auto increment field in your MySQL table, and you want the custom starting value as an auto increment, for example, you want your auto increment value to start from 500 or 1000, instead of the default value i.e. 1, then here you go.

Auto Increment Custom Value

If you have a table, say student, and you want your auto increment value to start from value 500, then here is the alter query:

ALTER TABLE student AUTO_INCREMENT=500;

Hope this will help you in start your custom value for auto increment.

Uncategorised

Leave a Reply

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