Reputation: 21
String index=" CREATE INDEX "+index_name+" on "+table_name+" ";
Error occurs near index_name
. I have tried inserting an additional ";"
to indicate statement end but it didn't work.
ERROR: android.database.sqlite.SQLiteException: near "index_d": syntax error (code 1): , while compiling: CREATE INDEX result_vinu1 on index_d
Upvotes: 0
Views: 61
Reputation: 107
In index, there should be column.
String index=" CREATE INDEX "+index_name+" on "+table_name+" (col_name) ";
Upvotes: 1