mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
24 lines
365 B
MySQL
24 lines
365 B
MySQL
|
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;
|