Subject: Re: [sqlite] nested foreign keys
No, it means that you did not specify the whatisness of grandParent, parent, or
child; and/or, you have not enabled foreign_keys.
https://sqlite.org/lang_createtable.html
https://sqlite.org/pragma.html#pragma_foreign_keys
NB: I have compiled the CLI
No, it means that you did not specify the whatisness of grandParent, parent, or
child; and/or, you have not enabled foreign_keys.
https://sqlite.org/lang_createtable.html
https://sqlite.org/pragma.html#pragma_foreign_keys
NB: I have compiled the CLI with foreign key enforcement ON be default.
nt: Thursday, October 25, 2018 12:37 AM
> To: SQLite mailing list
> Subject: Re: [sqlite] nested foreign keys
>
> These statements worked for me:
>
>
> CREATE TABLE grandparent (id INTEGER PRIMARY KEY);
>
> CREATE TABLE parent (id INTEGER PRIMARY KEY REFERENCES grandpa
The statements work. Insertion fails.
Roman
From: sqlite-users [sqlite-users-boun...@mailinglists.sqlite.org] on behalf of
David Yip [dw...@peach-bun.com]
Sent: Thursday, October 25, 2018 12:37 AM
To: SQLite mailing list
Subject: Re: [sqlite] nested
These statements worked for me:
CREATE TABLE grandparent (id INTEGER PRIMARY KEY);
CREATE TABLE parent (id INTEGER PRIMARY KEY REFERENCES grandparent(id));
CREATE TABLE child (id INTEGER PRIMARY KEY REFERENCES parent(id));
The foreign key constraints work as you'd expect also.
What are you
5 matches
Mail list logo