java - How come i get a syntax error code 1 in this simple sqlite query -
I have found a sqlite query that looks like this:
string sql_group = " Create a table group (id VARCHAR (25), name VARCHAR (25), account_id VARCHAR (25)); " And when I do:
Db.execSQL (sql_group); This gives a serious error, I have a syntax error code 1 while compiling.
I do not know what this is.
Because GROUP , which is the name of your table, a reserved keyword is. You still use it but you have to remove it from brackets , string sql_group = "create table [group] (id varchar (25), ... ... -
But I suggest you use such names to avoid problems in the future. Should be avoided.
Comments
Post a Comment