2020-06-20 11:29:01 +00:00
|
|
|
SET send_logs_level = 'fatal';
|
2018-12-18 18:43:06 +00:00
|
|
|
|
2015-07-25 11:59:21 +00:00
|
|
|
SELECT (SELECT (SELECT (SELECT (SELECT (SELECT count() FROM (SELECT * FROM system.numbers LIMIT 10)))))) = (SELECT 10), ((SELECT 1, 'Hello', [1, 2]).3)[1];
|
2015-07-26 07:08:46 +00:00
|
|
|
SELECT toUInt64((SELECT 9)) IN (SELECT number FROM system.numbers LIMIT 10);
|
2015-07-26 10:40:32 +00:00
|
|
|
SELECT (SELECT toDate('2015-01-02')) = toDate('2015-01-02'), 'Hello' = (SELECT 'Hello');
|
|
|
|
SELECT (SELECT toDate('2015-01-02'), 'Hello');
|
|
|
|
SELECT (SELECT toDate('2015-01-02'), 'Hello') AS x, x, identity((SELECT 1)), identity((SELECT 1) AS y);
|
2019-02-12 10:09:03 +00:00
|
|
|
-- SELECT (SELECT uniqState(''));
|
|
|
|
|
2021-02-24 14:13:29 +00:00
|
|
|
SELECT ( SELECT throwIf(1 + dummy) ); -- { serverError 395 }
|
2021-07-16 13:38:35 +00:00
|
|
|
|
|
|
|
-- Scalar subquery with 0 rows must return Null
|
|
|
|
SELECT (SELECT 1 WHERE 0);
|
|
|
|
-- But tuple and array can't be inside nullable
|
|
|
|
SELECT (SELECT 1, 2 WHERE 0); -- { serverError 125 }
|
|
|
|
SELECT (SELECT [1] WHERE 0); -- { serverError 125 }
|
|
|
|
-- Works for not-empty casle
|
|
|
|
SELECT (SELECT 1, 2);
|
|
|
|
SELECT (SELECT [1]);
|
|
|
|
-- Several rows
|
|
|
|
SELECT (SELECT number FROM numbers(2)); -- { serverError 125 }
|