Reputation: 519
String CREATE_ASSIGNMENTS_TABLE= "create table "
+ ASSIGNMENTS + "(" + TITLE
+ " text not null, " + DESCRIPTION
+ " text not null, " + REFERENCES + " text not null );";
This is my create table query to create a table in SQLite.
I have three fields (title,description,reference
). All are text fields. But when I execute the code, I get the following Exception:
android.database.sqlite.SQLiteException: near "references": syntax error (code 1): , while compiling: create table ASSIGNMENTS(TITLE text not null, DESCRIPTION text not null, REFERENCES text not null);
It is pointing to an error in the REFERENCES
field. But I couldn't find any syntax error there. Please help me out in this matter.
Upvotes: 1
Views: 767