mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
20 lines
556 B
SQL
20 lines
556 B
SQL
DROP TABLE IF EXISTS prewhere_defaults;
|
|
|
|
CREATE TABLE prewhere_defaults (d Date DEFAULT '2000-01-01', k UInt64 DEFAULT 0, x UInt16) ENGINE = MergeTree(d, k, 1);
|
|
|
|
INSERT INTO prewhere_defaults (x) VALUES (1);
|
|
|
|
SET max_block_size = 1;
|
|
|
|
SELECT * FROM prewhere_defaults PREWHERE x != 0 ORDER BY x;
|
|
|
|
ALTER TABLE prewhere_defaults ADD COLUMN y UInt16 DEFAULT x;
|
|
|
|
SELECT * FROM prewhere_defaults PREWHERE x != 0 ORDER BY x;
|
|
|
|
INSERT INTO prewhere_defaults (x) VALUES (2);
|
|
|
|
SELECT * FROM prewhere_defaults PREWHERE x != 0 ORDER BY x;
|
|
|
|
DROP TABLE prewhere_defaults;
|