ClickHouse/dbms/tests/queries/0_stateless/00709_virtual_column_partition_id.sql

11 lines
322 B
MySQL
Raw Normal View History

2018-09-10 10:20:21 +00:00
DROP TABLE IF EXISTS test.partition_id;
CREATE TABLE IF NOT EXISTS test.partition_id (d Date DEFAULT '2000-01-01', x UInt64) ENGINE = MergeTree(d, x, 5);
INSERT INTO test.partition_id VALUES (100, 1), (200, 2), (300, 3);
SELECT _partition_id FROM test.partition_id ORDER BY x;
DROP TABLE IF EXISTS test.partition_id;