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 keybut 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

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -