ClickHouse/dbms/tests/queries/0_stateless/00180_attach_materialized_view.sql

13 lines
296 B
SQL

DROP TABLE IF EXISTS t;
DROP TABLE IF EXISTS mv;
DROP TABLE IF EXISTS `.inner.mv`;
CREATE TABLE t (x UInt8) ENGINE = Null;
CREATE MATERIALIZED VIEW mv ENGINE = Null AS SELECT * FROM t;
DETACH TABLE mv;
ATTACH MATERIALIZED VIEW mv ENGINE = Null AS SELECT * FROM t;
DROP TABLE t;
DROP TABLE mv;