Jump to content

[SOLVED] Increment help


Eiolon

Recommended Posts

I am creating a MySQL database to store purchase order information.  Is there a way to control the auto-increment ability so I can set a number to start with?  For example, the first record would be 10000 instead of just 1.  If I can't do that with the primary key then is there a way to do it in a different field?  Thanks!

Link to comment
https://forums.phpfreaks.com/topic/41497-solved-increment-help/
Share on other sites

auto_increment_offset determines the starting point for the AUTO_INCREMENT column value.

 

You've got to update the auto_increment_offset value:

SET @@auto_increment_offset = 10000;

 

For more info, check out the MySQL System Variables page of the manual.

Link to comment
https://forums.phpfreaks.com/topic/41497-solved-increment-help/#findComment-201048
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.