mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
24 lines
365 B
SQL
24 lines
365 B
SQL
DROP DICTIONARY IF EXISTS dict;
|
|
DROP TABLE IF EXISTS source;
|
|
|
|
CREATE TABLE source
|
|
(
|
|
id UInt64,
|
|
value String
|
|
)
|
|
ENGINE=Memory;
|
|
|
|
CREATE DICTIONARY dict
|
|
(
|
|
id UInt64,
|
|
value String
|
|
)
|
|
PRIMARY KEY id
|
|
SOURCE(CLICKHOUSE(TABLE 'source'))
|
|
LAYOUT(DIRECT());
|
|
|
|
SELECT 1 IN (SELECT dictGet('dict', 'value', materialize('1')));
|
|
|
|
DROP DICTIONARY dict;
|
|
DROP TABLE source;
|