3 ms·
ClickHouse has no reserved keywords, e.g. SELECT SELECT FROM FROM is a valid query.
by zX41ZdbW 3y ago
ClickHouse has no reserved keywords, e.g.
SELECT SELECT FROM FROM
is a valid query.
- SpicyLemonZest 3y agoI'm confused how their parser could support that. Isn't `SELECT SELECT FROM FROM foo` ambigous between "get the column 'SELECT' from the table 'FROM' aliased as 'foo'" and "get the column 'SELECT' aliased as 'FROM' from the table 'foo'"?
- zX41ZdbW 3y agoUnquoted alias without the AS keyword cannot be named FROM.
- deleted 3y ago[deleted]
- gkbrk 3y agoYou can make it even funnier. create table from (select UInt8, where UInt8) engine = MergeTree() order by tuple(); insert into from values (1, 1), (2, 1), (3, 0), (4, 0), (5, 1); select select from from where where; select select from from where where is a really lovely query.