mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
18 lines
367 B
SQL
18 lines
367 B
SQL
DROP TABLE IF EXISTS test;
|
|
CREATE TABLE test Engine = MergeTree ORDER BY number AS SELECT number, toString(rand()) x from numbers(10000000);
|
|
|
|
SELECT count() FROM test;
|
|
|
|
ALTER TABLE test DETACH PARTITION tuple();
|
|
|
|
SELECT count() FROM test;
|
|
|
|
DETACH TABLE test;
|
|
ATTACH TABLE test;
|
|
|
|
ALTER TABLE test ATTACH PARTITION tuple();
|
|
|
|
SELECT count() FROM test;
|
|
|
|
DROP TABLE test;
|