ClickHouse/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.sql
2022-06-23 11:24:54 +02:00

9 lines
289 B
SQL

DROP TABLE IF EXISTS default;
set allow_deprecated_syntax_for_merge_tree=1;
CREATE TABLE default (d Date DEFAULT toDate(t), t DateTime) ENGINE = MergeTree(d, t, 8192);
INSERT INTO default (t) VALUES ('1234567890');
SELECT toStartOfMonth(d), toUInt32(t) FROM default;
DROP TABLE default;