In 3.23 or later: Just specify an ID of 1000 when you insert your first record. If every record thereafter is INSERTed with ID = NULL (or just not specified), then AUTO_INCREMENT will automatically bump up each ID field by one after the first one. If you are loading data from mysqlimport or LOAD DATA, you can insert a fake record with no values *except* ID, and specify ID = 999 .
I got this information from "MySQL" by Paul DuBois (p. 93). I had just read that part of the book yesterday. Recommended! -- Erik On Wednesday, December 5, 2001, at 01:16 PM, Mysql List wrote: > 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 <mysql-unsubscribe- > [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