Eiolon Posted March 6, 2007 Share Posted March 6, 2007 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 More sharing options...
obsidian Posted March 6, 2007 Share Posted March 6, 2007 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 More sharing options...
Eiolon Posted March 6, 2007 Author Share Posted March 6, 2007 NVM, I read that wrong. THanks! Link to comment https://forums.phpfreaks.com/topic/41497-solved-increment-help/#findComment-201053 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.