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);";
1
  • in which sequence your queries are fired is the queryGenero and querySinger are fired before your firs statement executed? Commented Oct 18, 2013 at 5:41

1 Answer 1

4

You have a typo in: FOREING should be FOREIGN

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.