similar-ish to setting your sequence in oracle.... try this: The create table statement below will start the auto increment at 1
CREATE TABLE TableX ( X_primary_key INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, X_col1 VARCHAR(20) NOT NULL, X_col2 VARCHAR(40) NOT NULL, X_col3 VARCHAR(10) NOT NULL, PRIMARY KEY(X_primary_key) ) AUTO_INCREMENT = 1; also see: ALTER TABLE tbl_name AUTO_INCREMENT = 100 will start your records at 100 ALTER TABLE tbl_name AUTO_INCREMENT = 1000 will start your records at 100 I haven't actually used the last bit of code, it is courtsey of : http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html this should sort you out...... Regards Joe -----Original Message----- From: Amit Wadhwa [mailto:[EMAIL PROTECTED] Sent: 01 April 2004 23:33 To: [EMAIL PROTECTED] Subject: question on autoincrement Hi All, I was wondering if there was a way in mySQL wherein I tell the autoincrement spec where to start from? Eg. Autoincrement startfrom 10000 And the values go in as: 10001..10002 and so on,.. instead of 1..2..3.. ..like sequencing in oracle… Any help is appreciated, Thanks Amit Wadhwa Data Analyst -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]