mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 15:21:43 +00:00
34 lines
881 B
SQL
34 lines
881 B
SQL
DROP TABLE IF EXISTS set;
|
|
DROP TABLE IF EXISTS number;
|
|
|
|
CREATE TABLE number (number UInt64) ENGINE = Memory();
|
|
INSERT INTO number values (1);
|
|
|
|
SELECT '----- Default Settings -----';
|
|
CREATE TABLE set (val UInt64) ENGINE = Set();
|
|
INSERT INTO set VALUES (1);
|
|
DETACH TABLE set;
|
|
ATTACH TABLE set;
|
|
SELECT number FROM number WHERE number IN set LIMIT 1;
|
|
|
|
DROP TABLE set;
|
|
|
|
SELECT '----- Settings persistent=1 -----';
|
|
CREATE TABLE set (val UInt64) ENGINE = Set() SETTINGS persistent=1;
|
|
INSERT INTO set VALUES (1);
|
|
DETACH TABLE set;
|
|
ATTACH TABLE set;
|
|
SELECT number FROM number WHERE number IN set LIMIT 1;
|
|
|
|
DROP TABLE set;
|
|
|
|
SELECT '----- Settings persistent=0 -----';
|
|
CREATE TABLE set (val UInt64) ENGINE = Set() SETTINGS persistent=0;
|
|
INSERT INTO set VALUES (1);
|
|
DETACH TABLE set;
|
|
ATTACH TABLE set;
|
|
SELECT number FROM number WHERE number IN set LIMIT 1;
|
|
|
|
DROP TABLE set;
|
|
DROP TABLE number;
|