mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-12 15:33:44 +00:00
ad79ef48a2
* add tests * add bench
25 lines
614 B
Plaintext
25 lines
614 B
Plaintext
|
|
CREATE TABLE t8(b TEXT, c TEXT);
|
|
INSERT INTO t8 VALUES('a', 'one');
|
|
INSERT INTO t8 VALUES('b', 'two');
|
|
INSERT INTO t8 VALUES(NULL, 'three');
|
|
INSERT INTO t8 VALUES(NULL, 'four');
|
|
|
|
|
|
SELECT coalesce(b, 'null') || '/' || c FROM t8 x ORDER BY x.b, x.c
|
|
|
|
|
|
CREATE UNIQUE INDEX i1 ON t8(b);
|
|
SELECT coalesce(b, 'null') || '/' || c FROM t8 x ORDER BY x.b, x.c
|
|
|
|
|
|
DROP INDEX i1;
|
|
CREATE UNIQUE INDEX i1 ON t8(b, c);
|
|
SELECT coalesce(b, 'null') || '/' || c FROM t8 x ORDER BY x.b, x.c
|
|
|
|
|
|
CREATE TABLE t2(a, b NOT NULL, c);
|
|
CREATE UNIQUE INDEX t2ab ON t2(a, b);
|
|
CREATE UNIQUE INDEX t2ba ON t2(b, a);
|
|
|