sql - Qt/MySQLITE errors on simple query which MySQL accepts -
i have qsqldatabase of qsqlite type give me error
near "auto_increment": syntax error unable execute statement
on 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
autoincrement
, id not null integer primary key
but neither made difference.
what's wrong it?
the correct syntax is:
create table `student` ( "id" integer primary key autoincrement not null , "fullname" text not null , "date_of_birth" datetime not null , "date_enrolled" datetime not null , "current_academic_year" integer not null )
Comments
Post a Comment