ClickHouse/tests/queries/0_stateless/01071_live_view_detach_dependency.sql
2020-04-03 03:19:11 +03:00

11 lines
273 B
SQL

SET allow_experimental_live_view = 1;
DROP TABLE IF EXISTS test;
DROP TABLE IF EXISTS lv;
CREATE TABLE test (n Int8) ENGINE = Memory;
CREATE LIVE VIEW lv AS SELECT * FROM test;
DETACH TABLE lv;
INSERT INTO test VALUES (42);
DROP TABLE test;
ATTACH TABLE lv;
DROP TABLE lv;