mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 18:14:03 +00:00
12 lines
391 B
SQL
12 lines
391 B
SQL
DROP TABLE IF EXISTS clear_column;
|
|
|
|
CREATE TABLE clear_column(x UInt32, y UInt32) ENGINE MergeTree ORDER BY x PARTITION by x;
|
|
INSERT INTO clear_column VALUES (1, 1), (2, 3);
|
|
|
|
ALTER TABLE clear_column CLEAR COLUMN y IN PARTITION 1;
|
|
SELECT * FROM clear_column ORDER BY x;
|
|
ALTER TABLE clear_column CLEAR COLUMN y IN PARTITION 2;
|
|
SELECT * FROM clear_column ORDER BY x;
|
|
|
|
DROP TABLE clear_column;
|