quoted from:  http://www.bitbybit.dk/mysqlfaq/faq.html#auto_increment

In latter versions of MySQL, you can specify AUTO_INCREMENT=n as a table
option. This will tell MySQL to use n for the initial value. Any new rows
added will increment the counter by 1, as usual. This value is lost if you
delete all rows from the table.

In older versions, you need to insert a dummy row in your table, if you wish
to ensure that the table increments from a certain value

Whichever method you choose, the statment above still holds: do not specify
a negative number as a starting value. 

-----Original Message-----
From: Mysql List [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 12:17 PM
To: mysql
Subject: Help with Auto Increment


Hi,
How do I start an autoincrement field at a certain value, say 1000?
I have a field as:
ID INT NOT NULL AUTO_INCREMENT,PRIMARY KEY (ID)
How do I modify it to start at 1000?

These all generate errors:
modify mytable ID AUTO_INCREMENT = 1000;
modify mytable ID = 1000;
modify mytable ID AUTO_INCREMENT 1000;
 
And I can't find an example in the manual.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to