SQL adaptation guide For SQLite 3.5.x, 3.6.x / Data dictionary |
CREATE TABLE orders ( ... , FOREIGN KEY(ord_customer) REFERENCES customer(cust_num) ) )
SQLite (3.7) implements foreign key support, but this feature is not enabled by default. In fact, the FOREIGN KEY syntax does not raise an SQL error, but it has no effect.
PRAGMA foreign_keys = ON;
Future releases of SQLite might change so that foreign key constraints enabled by default.