mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
13 lines
397 B
SQL
13 lines
397 B
SQL
DROP TABLE IF EXISTS t_enum;
|
|
DROP TABLE IF EXISTS t_source;
|
|
|
|
CREATE TABLE t_enum(x Enum8('hello' = 1, 'world' = 2)) ENGINE = TinyLog;
|
|
CREATE TABLE t_source(x Nullable(String)) ENGINE = TinyLog;
|
|
|
|
INSERT INTO t_source (x) VALUES ('hello');
|
|
INSERT INTO t_enum(x) SELECT x from t_source WHERE x in ('hello', 'world');
|
|
SELECT * FROM t_enum;
|
|
|
|
DROP TABLE IF EXISTS t_enum;
|
|
DROP TABLE IF EXISTS t_source;
|