Hello,
I'm new in this list and I also a newbie with MySql. I have a big problem with autoincrementing with an initial value. For example:
use Database Business;
create Table Clients(Client_ID int not null primary key auto_increment=10, Full_Name varchar(30));
Each time I assign an initial value to auto_increment I get an error and worse, the MySql server only tell me there is an error, it doesn't tell me what kind of error is.
I tried at leat 30 times before writing this message. I really unable to solve this problem. auto_increment=n is an accepted syntax and it is documented in all sql books.
I know of no documentation that states you should use the option in the way you show above. To set the initial AUTO_INCREMENT value, you use an AUTO_INCREMENT option *following* the closing parenthesis that ends the column definitions in the CREATE TABLE statement.
Try this instead:
CREATE TABLE Clients ( Client_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Full_Name VARCHAR(30) ) AUTO_INCREMENT = 10;
You can put that all on one line if you like. I put it on multiple lines to make it clearer where the table option at the end goes.
Can you explain me why I have this problem?
Thanks Fandango
-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]