ClickHouse/dbms/tests/queries/0_stateless/01060_shutdown_table_after_detach.sql
Guillaume Tassery 4c316e7671 add test
2020-01-10 12:20:40 +01:00

15 lines
327 B
SQL

CREATE TABLE IF NOT EXISTS test Engine = MergeTree ORDER BY number AS SELECT number, toString(rand()) x from numbers(10000000);
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;