views:

170

answers:

2

Cant add foreign key constraint in sqlite ...........

+2  A: 

sqlite does not enforce foreign key constraints.

Darin Dimitrov
A: 

As of SQLite 3.6.19, SQLite supports foreign keys. You need to enable them via:

sqlite> PRAGMA foreign_keys = ON;

They are turned off by default for backwards compatibility.

See the documentation for more details.

romandas