You can also set the auto_increment start value in the CREATE table: CREATE TABLE mytable ( myval int auto_increment) AUTO_INCREMENT=100;
Note that the AUTO_INCREMENT=100 is set outside of the fields' definitions. However, when you delete all records with "DELETE FROM mytable", the counter will be reset to 1. So that "INSERT INTO mystable VALUES(NULL)" will cause myval to be initialized to 1, instead of 100. If you "DELETE FROM mytable WHERE myval>0" which should delete all records, and you insert with "INSERT INTO mystable VALUES(NULL)", then myval will be set to 100. -----Original Message----- From: Manish Mehta [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 6:25 AM To: mysql Subject: auto_increment Hi Is it possible auto_increment start 100 instead of 1 . for example create table a ( a int(10) primary key auto_increment 100); Manish Mehta E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- 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