it doesn't work with innodb table. http://dev.mysql.com/doc/mysql/en/innodb-restrictions.html InnoDB does not support the AUTO_INCREMENT table option for setting the initial sequence value in a CREATE TABLE or ALTER TABLE statement. To set the value with InnoDB, insert a dummy row with a value one less and delete that dummy row, or insert the first row with an explicit value specified.
HTH! > Hello, > I am trying to get auto_increment to begin at a certain integer. > > CREATE TABLE USERS ( > user_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, > username varchar(50), > firstname varchar(50), > middlename varchar(50), > lastname varchar(50), > email varchar(100), > business_name varchar(250), > visible varchar(1) NOT NULL DEFAULT 'T' > ) TYPE=InnoDB; > > ALTER TABLE users auto_increment = 590; > > After executing this above code, and do a insert, > insert into users (username) values ('scott'); > > I get a user_id of 1 and not 590. > > What possibly could I be doing wrong. I have read the fine manual, and it > looks like I am doing the correct thing? > > mysql> \s > -------------- > mysql Ver 12.21 Distrib 4.0.15, for Win95/Win98 (i32) > > Thanks, > > Scott K Purcell | Developer | VERTIS | > 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | > 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com > <http://www.vertisinc.com/> > > Vertis is the premier provider of targeted advertising, media, and > marketing services that drive consumers to marketers more effectively. > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]