I have a QSqlDatabase of QSQLITE type which give me this error
near "AUTO_INCREMENT": syntax error Unable to execute statement
on this statement (which MySQL executes correctly)
CREATE TABLE `Student` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`fullname` TEXT NOT NULL ,
`date_of_birth` TIMESTAMP NOT NULL ,
`date_enrolled` TIMESTAMP NOT NULL ,
`current_academic_year` INT NOT NULL
)
I tried changing AUTO_INCREMENT
to AUTOINCREMENT
and then to id NOT NULL INTEGER PRIMARY KEY
but neither made any difference.
What's wrong with it?