ClickHouse/tests/queries/0_stateless/01060_shutdown_table_after_detach.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

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;