Consider:
CREATE TABLE a(id INTEGER PRIMARY KEY);
CREATE TABLE b(id INTEGER PRIMARY KEY);
CREATE TABLE c(id INTEGER PRIMARY KEY, a_id, b_id,
FOREIGN KEY (a_id) REFERENCES a(id)
FOREIGN KEY (b_id) REFERENCES b(id));
Note the lack of comma between the two foreign key constraints in the
definition for table c. The syntax diagrams in the documentation indicate
that the comma is mandatory, but not only does this not cause a parse
error, but both of them are detected:
sqlite> PRAGMA foreign_key_list(c);
id seq table from to on_update
on_delete match
---------- ---------- ---------- ---------- ---------- ----------
---------- ----------
0 0 b b_id id NO ACTION NO
ACTION NONE
1 0 a a_id id NO ACTION NO
ACTION NONE
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users