mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
22 lines
1.2 KiB
SQL
22 lines
1.2 KiB
SQL
SELECT ifNull('x', 'y') AS res, toTypeName(res);
|
|
SELECT ifNull(materialize('x'), materialize('y')) AS res, toTypeName(res);
|
|
|
|
SELECT ifNull(toNullable('x'), 'y') AS res, toTypeName(res);
|
|
SELECT ifNull(toNullable('x'), materialize('y')) AS res, toTypeName(res);
|
|
|
|
SELECT ifNull('x', toNullable('y')) AS res, toTypeName(res);
|
|
SELECT ifNull(materialize('x'), toNullable('y')) AS res, toTypeName(res);
|
|
|
|
SELECT ifNull(toNullable('x'), toNullable('y')) AS res, toTypeName(res);
|
|
|
|
SELECT ifNull(toString(number), toString(-number)) AS res, toTypeName(res) FROM system.numbers LIMIT 5;
|
|
SELECT ifNull(nullIf(toString(number), '1'), toString(-number)) AS res, toTypeName(res) FROM system.numbers LIMIT 5;
|
|
SELECT ifNull(toString(number), nullIf(toString(-number), '-3')) AS res, toTypeName(res) FROM system.numbers LIMIT 5;
|
|
SELECT ifNull(nullIf(toString(number), '1'), nullIf(toString(-number), '-3')) AS res, toTypeName(res) FROM system.numbers LIMIT 5;
|
|
|
|
SELECT ifNull(NULL, 1) AS res, toTypeName(res);
|
|
SELECT ifNull(1, NULL) AS res, toTypeName(res);
|
|
SELECT ifNull(NULL, NULL) AS res, toTypeName(res);
|
|
|
|
SELECT IFNULL(NULLIF(toString(number), '1'), NULLIF(toString(-number), '-3')) AS res, toTypeName(res) FROM system.numbers LIMIT 5;
|