2017-04-14 12:40:48 +00:00
|
|
|
DROP TABLE IF EXISTS test.drop_column;
|
|
|
|
CREATE TABLE test.drop_column (d Date, num Int64, str String) ENGINE = MergeTree(d, d, 8192);
|
|
|
|
|
2017-04-17 19:30:14 +00:00
|
|
|
insert into test.drop_column values ('2016-12-12', 1, 'a'), ('2016-11-12', 2, 'b');
|
2017-04-14 12:40:48 +00:00
|
|
|
|
2017-04-17 19:30:14 +00:00
|
|
|
SELECT num, str FROM test.drop_column ORDER BY num;
|
2017-04-14 12:40:48 +00:00
|
|
|
alter table test.drop_column drop column num from partition '201612';
|
2017-04-17 19:30:14 +00:00
|
|
|
SELECT num, str FROM test.drop_column ORDER BY num;
|
2017-04-14 12:40:48 +00:00
|
|
|
|
|
|
|
DROP TABLE test.drop_column;
|