ClickHouse/tests/queries/0_stateless/01494_storage_join_persistency.sql
2020-09-19 19:39:47 +03:00

29 lines
729 B
SQL

DROP TABLE IF EXISTS join;
SELECT '----- Default Settings -----';
CREATE TABLE join (k UInt64, s String) ENGINE = Join(ANY, LEFT, k);
INSERT INTO join VALUES (1,21);
DETACH TABLE join;
ATTACH TABLE join;
SELECT * from join;
DROP TABLE join;
SELECT '----- Settings persistent=1 -----';
CREATE TABLE join (k UInt64, s String) ENGINE = Join(ANY, LEFT, k) SETTINGS persistent=1;
INSERT INTO join VALUES (1,21);
DETACH TABLE join;
ATTACH TABLE join;
SELECT * from join;
DROP TABLE join;
SELECT '----- Settings persistent=0 -----';
CREATE TABLE join (k UInt64, s String) ENGINE = Join(ANY, LEFT, k) SETTINGS persistent=0;
INSERT INTO join VALUES (1,21);
DETACH TABLE join;
ATTACH TABLE join;
SELECT * from join;
DROP TABLE join;