2019-06-03 19:53:11 +00:00
|
|
|
DROP TABLE IF EXISTS test.lv;
|
|
|
|
DROP TABLE IF EXISTS test.mt;
|
|
|
|
|
|
|
|
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
2019-06-08 13:26:02 +00:00
|
|
|
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
2019-06-03 19:53:11 +00:00
|
|
|
|
|
|
|
SHOW TABLES LIKE 'lv';
|
|
|
|
|
|
|
|
INSERT INTO test.mt VALUES (1),(2),(3);
|
|
|
|
|
2019-06-08 13:26:02 +00:00
|
|
|
SELECT *,_version FROM test.lv;
|
|
|
|
SELECT *,_version FROM test.lv;
|
|
|
|
|
|
|
|
INSERT INTO test.mt VALUES (1),(2),(3);
|
|
|
|
|
|
|
|
SELECT *,_version FROM test.lv;
|
|
|
|
SELECT *,_version FROM test.lv;
|
2019-06-03 19:53:11 +00:00
|
|
|
|
|
|
|
DROP TABLE test.lv;
|
|
|
|
DROP TABLE test.mt;
|