0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-14 00:55:18 +00:00
Files
libsql/libsql-sqlite3/test/fixtures/conflict.test
2024-05-27 12:59:10 +02:00

24 lines
403 B
Plaintext

CREATE TABLE t1(
x PRIMARY KEY,
UNIQUE(x,x),
UNIQUE(x,x) ON CONFLICT REPLACE
);
INSERT INTO t1(x) VALUES(1);
SELECT * FROM t1;
SELECT * FROM t1;
-- ON CONFLICT is allowed on table CHECK constraints
CREATE TABLE t1(a INT, CHECK( a!=5 ) ON CONFLICT ignore);
SELECT a FROM t1 ORDER BY a;
INSERT OR IGNORE INTO t1(a) VALUES(4),(5),(6);
SELECT a FROM t1 ORDER BY a;