2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS enum;
|
2016-02-01 18:40:27 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE enum (x Enum8('Hello' = -100, '\\' = 0, '\t\\t' = 111), y UInt8) ENGINE = TinyLog;
|
|
|
|
INSERT INTO enum (y) VALUES (0);
|
|
|
|
SELECT * FROM enum ORDER BY x, y FORMAT PrettyCompact;
|
|
|
|
INSERT INTO enum (x) VALUES ('\\');
|
|
|
|
SELECT * FROM enum ORDER BY x, y FORMAT PrettyCompact;
|
|
|
|
INSERT INTO enum (x) VALUES ('\t\\t');
|
|
|
|
SELECT * FROM enum ORDER BY x, y FORMAT PrettyCompact;
|
|
|
|
SELECT x, y, toInt8(x), toString(x) AS s, CAST(s AS Enum8('Hello' = -100, '\\' = 0, '\t\\t' = 111)) AS casted FROM enum ORDER BY x, y FORMAT PrettyCompact;
|
2016-02-01 18:40:27 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE enum;
|