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
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
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_INCR