I have this code:
CREATE TABLE Company ( Comp_Code INT(5) NOT NULL AUTO_INCRMENT=1000, Comp_Name VARCHAR(15) NOT NULL, primary key (Comp_Code) );
But when I run it in MYSQL from WAMPServer, I get the error:
Error 1064 (42000): There is an error in your SQL syntax; check the manual for your MySQL server version for the correct syntax to use around '=1000, Comp_Name VARCHAR(15) NOT NULL, Primary key (Comp_Code) )' on line 2
Why does this happen?
AUTO_INCRMENT
is a column option.Initial
AUTO_INCRMENT=1000
The value is the table option.