1

Well Hello guys, I'm working on an android app with an sqlite3 database, can you please help me to debug this code, because it says syntax error and I can't find the error.

"CREATE TABLE cancion(id INTEGER PRIMARY KEY, name TEXT, genre_id INTEGER, singer_id INTEGER," +
            " FOREING KEY (genre_id) REFERENCES genre(id)," +
            " FOREING KEY (singer_id) REFERENCES singer(id));";
    String queryGenero = "CREATE TABLE genre(id INTEGER PRIMARY KEY, name TEXT);";
    String querySinger = "CREATE TABLE singer(id INTEGER PRIMARY KEY, name TEXT);";
4

1 回答 1

4

你有一个错字:FOREING应该是FOREIGN

于 2013-10-18T05:45:18.740 回答