On 9 August 2010 14:56, Black, Michael (IS) <michael.bla...@ngc.com> wrote:
> From http://www.sqlite.org/foreignkeys.html
>
>
>
> Although I believe I compiled my shell WITHOUT these defined but I still 
> don't get enforcement of the foreign key constraint.
>
> It appears that foreign keys are fully constrained by default.  Is there any 
> way in the shell to find out if it's enabled?
>

Shell compiled with SQLITE_OMIT_FOREIGN_KEYS defined

SQLite version 3.6.23.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
sqlite> pragma foreign_keys;
sqlite> pragma foreign_keys=on;
sqlite> pragma foreign_keys;
sqlite> pragma foreign_keys=off;
sqlite> pragma foreign_keys;
sqlite>

Shell compiled without SQLITE_OMIT_FOREIGN_KEYS defined
SQLite version 3.6.23.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
sqlite> pragma foreign_keys;
0
sqlite> pragma foreign_keys=on;
sqlite> pragma foreign_keys;
1
sqlite> pragma foreign_keys=off;
sqlite> pragma foreign_keys;
0

.
.
.
>
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Northrop Grumman Information Systems
>
>

Regards,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to