2022-06-23 10:58:34 +00:00
|
|
|
set allow_deprecated_syntax_for_merge_tree=1;
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS array_pk;
|
|
|
|
CREATE TABLE array_pk (key Array(UInt8), s String, n UInt64, d Date MATERIALIZED '2000-01-01') ENGINE = MergeTree(d, (key, s, n), 1);
|
2016-02-19 16:57:33 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO array_pk VALUES ([1, 2, 3], 'Hello, world!', 1);
|
|
|
|
INSERT INTO array_pk VALUES ([1, 2], 'Hello', 2);
|
|
|
|
INSERT INTO array_pk VALUES ([2], 'Goodbye', 3);
|
|
|
|
INSERT INTO array_pk VALUES ([], 'abc', 4);
|
|
|
|
INSERT INTO array_pk VALUES ([2, 3, 4], 'def', 5);
|
|
|
|
INSERT INTO array_pk VALUES ([5, 6], 'ghi', 6);
|
2016-02-19 16:57:33 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM array_pk ORDER BY n;
|
2016-02-19 16:57:33 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DETACH TABLE array_pk;
|
2020-09-09 13:32:50 +00:00
|
|
|
ATTACH TABLE array_pk;
|
2016-02-19 16:57:33 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM array_pk ORDER BY n;
|
2016-02-19 16:57:33 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE array_pk;
|