mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
16 lines
436 B
Plaintext
16 lines
436 B
Plaintext
-- { echo ON }
|
|
CREATE TABLE src (x UInt8) ENGINE = Memory;
|
|
CREATE TABLE dst (x UInt8) ENGINE = Memory;
|
|
CREATE MATERIALIZED VIEW mv1 TO dst AS SELECT * FROM src;
|
|
INSERT INTO src VALUES (0);
|
|
SELECT * from dst;
|
|
0
|
|
TRUNCATE TABLE dst;
|
|
--DROP TABLE src SYNC;
|
|
--CREATE TABLE src (y String) ENGINE = MergeTree order by tuple();
|
|
ALTER TABLE src ADD COLUMN y UInt8;
|
|
ALTER TABLE src DROP COLUMN x;
|
|
INSERT INTO src VALUES (0);
|
|
SELECT * from dst;
|
|
0
|