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?
problem with auto increment field
Moderator: jr
Re: problem with auto increment field
I found the solution myself.
I need to add a line into the table definition after the AUTO_INCREMENT column:
primary key (column name),
Maybe the developers of 'Access to Mysql' should add this fix to the program.
Access to Mysql is great software, by the way. Simple to use and does exactly what one expects it to do.
Many thanks for making it available.
I need to add a line into the table definition after the AUTO_INCREMENT column:
primary key (column name),
Maybe the developers of 'Access to Mysql' should add this fix to the program.
Access to Mysql is great software, by the way. Simple to use and does exactly what one expects it to do.
Many thanks for making it available.