>
> I guess the example below shows the intended behaviour for Sqlite?
>
> PRAGMA FOREIGN_KEYS=1;
> CREATE TABLE t1 (
> id INTEGER PRIMARY KEY
> );
>
> CREATE TABLE t2(
> id INTEGER PRIMARY KEY,
> t1_id INT NOT NULL,
> CONSTRAINT fk FOREIGN KEY(t1_id) REFERENCES t1(id)
> );
>
> INSERT INTO t1 V
lite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Daniel Polski
Sent: Tuesday, November 25, 2014 10:23 AM
To: General Discussion of SQLite Database
Subject: [sqlite] insert or ignore with foreign keys
I guess the example below shows the intended behaviour for Sqlite?
PRAG
I guess the example below shows the intended behaviour for Sqlite?
PRAGMA FOREIGN_KEYS=1;
CREATE TABLE t1 (
idINTEGER PRIMARY KEY
);
CREATE TABLE t2(
idINTEGER PRIMARY KEY,
t1_id INT NOT NULL,
CONSTRAINT fk FOREIGN KEY(t1_id) REFERENCES t1(id)
);
INSERT INTO t1 VALUES(2
3 matches
Mail list logo