problem with auto increment field
Posted: Thu Oct 23, 2008 1:26 pm
I try to convert an MS access (2000) database to mysql 5.2
This table definition gets created in the dump file:
CREATE TABLE `tblCategory` (
`CategoryID` INTEGER NOT NULL AUTO_INCREMENT,
`DatamainID` INTEGER,
`CodeID` INTEGER,
`CategoryNotes` VARCHAR(255)
) TYPE=MyISAM;
When I run this dump file with
mysql < dumpfile
I get this error:
Incorrect table definition; there can be only one auto column and it must be defined as a key
I do not understand this mysql error message, because only one column is defined as 'auto'.
Does anyone know what is wrong in the create table statement?
This table definition gets created in the dump file:
CREATE TABLE `tblCategory` (
`CategoryID` INTEGER NOT NULL AUTO_INCREMENT,
`DatamainID` INTEGER,
`CodeID` INTEGER,
`CategoryNotes` VARCHAR(255)
) TYPE=MyISAM;
When I run this dump file with
mysql < dumpfile
I get this error:
Incorrect table definition; there can be only one auto column and it must be defined as a key
I do not understand this mysql error message, because only one column is defined as 'auto'.
Does anyone know what is wrong in the create table statement?