mardi 21 juillet 2015

Syntax error in Sqlite query while adding foreign key

I got syntax error in my sqlite query while executing the query

  db.execSQL("CREATE TABLE "+TABLE_ABC+" (ID INTEGER PRIMARY KEY AUTOINCREMENT, EVENT_MATCH_ID INTEGER, FOREIGN KEY (EVENT_MATCH_ID) REFERENCES "+TABLE_DEF+" (MATCH_ID), EVENT_ID TEXT, EVENT_TYPE TEXT, EVENT_MINUTE TEXT," +
                        "EVENT_TEAM TEXT, EVENT_PLAYER TEXT, EVENT_PLAYER_ID TEXT, EVENT_RESULT TEXT)");

Error is " syntax error near EVENT_ID". Can anybody help me to trace the error?

Aucun commentaire:

Enregistrer un commentaire