2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: no-fasttest
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS json;
|
|
|
|
CREATE TABLE json (x Enum8('browser' = 1, 'mobile' = 2), y String) ENGINE = Memory;
|
2017-09-01 22:00:25 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO json (y) VALUES ('Hello');
|
2024-07-25 17:40:37 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM json ORDER BY y;
|
2017-09-01 22:00:25 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO json (y) FORMAT JSONEachRow {"y": "World 1"};
|
2024-07-25 17:40:37 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM json ORDER BY y;
|
2017-09-01 22:00:25 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO json (x, y) FORMAT JSONEachRow {"y": "World 2"};
|
2024-07-25 17:40:37 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM json ORDER BY y;
|
2017-09-01 22:00:25 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE json;
|