This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes can we preset value of auto-increment ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "can we preset value of auto-increment ?" Watch "can we preset value of auto-increment ?" New topic
Author

can we preset value of auto-increment ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
hi, can we preset the auto increment value to certain start number ?

ie: i let the auto-increment column start with number like 10001 , any insertion of the table will then keep increase number to 10002, 10003 and so on ?

i'm using mysql 5.0

thank you
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Yes, you can set this value. The Mysql manual explains how.
 
Consider Paul's rocket mass heater.
 
subject: can we preset value of auto-increment ?