Sqlite Exception, syntax error

不想你离开。 提交于 2019-11-28 12:43:49

you are using sqlite keyword as column name i.e. group sqliteKeyword which is restrict

Drop the NOT NULL for the id column.

Read here

Those two cases are not equivalent! Note that primary key in first case doesn't have NOT NULL.

CREATE TABLE agences(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,group INTEGER,username TEXT,email TEXT,contact_name TEXT,registration_date TEXT,activation TEXT,active INTEGER,store INTEGER,store_banner TEXT,rating REAL,language TEXT,identity TEXT,address TEXT,phone TEXT,company TEXT,webpage TEXT,code_postal TEXT,je_suis_un TEXT,ville TEXT,video TEXT);

group is a key word in sql, you can't use it as a column name, change group to other strings that can't be key word in sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!