ClickHouse/doc/reference/en/functions/conditional_functions.rst

8 lines
312 B
ReStructuredText
Raw Normal View History

2017-04-26 19:16:38 +00:00
Conditional functions
2017-06-09 13:11:45 +00:00
---------------------
2017-04-03 19:49:50 +00:00
2017-06-09 14:09:37 +00:00
if(cond, then, else), ternary operator cond ? then : else
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-04-26 19:16:38 +00:00
Returns 'then' if 'cond != 0', or 'else' if 'cond = 0'.
'cond' must be UInt 8, and 'then' and 'else' must be a type that has the smallest common type.