mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-15 22:39:05 +00:00
ad79ef48a2
* add tests * add bench
33 lines
977 B
Plaintext
33 lines
977 B
Plaintext
|
|
DELETE FROM sqlite_sequence;
|
|
CREATE TABLE t10a(a INTEGER PRIMARY KEY AUTOINCREMENT, b UNIQUE);
|
|
INSERT INTO t10a VALUES(888,9999);
|
|
CREATE TABLE t10b(x INTEGER PRIMARY KEY AUTOINCREMENT, y UNIQUE);
|
|
INSERT INTO t10b SELECT * FROM t10a;
|
|
SELECT * FROM sqlite_sequence;
|
|
|
|
|
|
CREATE TABLE t11(a INTEGER PRIMARY KEY AUTOINCREMENT,b UNIQUE);
|
|
INSERT INTO t11(a,b) VALUES(2,3),(5,6),(4,3),(1,2)
|
|
ON CONFLICT(b) DO UPDATE SET a=a+1000;
|
|
SELECT seq FROM sqlite_sequence WHERE name='t11';
|
|
|
|
|
|
CREATE TABLE t1(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
|
|
CREATE TABLE t2(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
|
|
CREATE TABLE t3(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
|
|
|
|
INSERT INTO t1 VALUES(NULL, 1);
|
|
INSERT INTO t2 VALUES(NULL, 2);
|
|
INSERT INTO t3 VALUES(NULL, 3);
|
|
|
|
SELECT name FROM sqlite_sequence;
|
|
|
|
|
|
UPDATE sqlite_sequence SET name=NULL WHERE name='t2';
|
|
INSERT INTO t3 VALUES(NULL, 4);
|
|
DELETE FROM t3;
|
|
INSERT INTO t3 VALUES(NULL, 5);
|
|
SELECT * FROM t3;
|
|
|