Is this supported? I’m attempting to create a table but am getting a syntax error when compiling.
private static final String ROOM_CREATE =
"create table room (_id integer primary key autoincrement, " +
"facility integer not null, FORIEGN KEY (facility) REFERENCES facility(_id));";
Some great answers, particularly @sfratini for spotting the typo in the FOREIGN keyword. Can I also recommend that you should troubleshoot your SQL statements by using a command line client, such as the “Precompiled Binaries For Windows” (see http://sqlite.org/download.html). That way, you can validate the CREATE TABLE and INSERT statements before you put them into your app.