ClickHouse/dbms/tests/queries/0_stateless/01060_defaults_all_columns.sql

11 lines
411 B
MySQL
Raw Normal View History

2020-01-09 19:24:29 +00:00
DROP TABLE IF EXISTS defaults_all_columns;
CREATE TABLE defaults_all_columns (n UInt8 DEFAULT 42, s String DEFAULT concat('test', CAST(n, 'String'))) ENGINE = Memory;
INSERT INTO defaults_all_columns FORMAT JSONEachRow {"n": 1, "s": "hello"} {};
INSERT INTO defaults_all_columns FORMAT JSONEachRow {"n": 2}, {"s": "world"};
SELECT * FROM defaults_all_columns ORDER BY n, s;
DROP TABLE defaults_all_columns;