1
Fork 0
kantodb/testdata/sql/index_multi_update.slt

21 lines
467 B
Text
Raw Normal View History

2025-03-27 13:45:43 -06:00
statement ok
CREATE TABLE myschema.mytable (one BIGINT NOT NULL, two BIGINT, PRIMARY KEY(one));
statement ok
CREATE INDEX mytable__idx__two ON myschema.mytable (two) NULLS NOT DISTINCT;
statement ok
INSERT INTO myschema.mytable (one, two) VALUES (1, 2);
statement ok
INSERT INTO myschema.mytable (one, two) VALUES (3, 2);
statement ok
UPDATE myschema.mytable SET two=100 WHERE two=2;
query II
SELECT one, two from myschema.mytable ORDER BY one;
----
1 100
3 100