Conditional Functions
Query service supports the following conditional functions.
Function | Return Type | Input Arguments | Description |
---|---|---|---|
coalesce(arg1, arg2, ...) | Same as the input |
| Returns the first non-null value in the argument list. |
if(condition, true_value, false_value) | Any data type |
| Returns true_value if condition is true, otherwise returns false_value . If false_value isn't specified and condition is false, returns null . |
nullif(value1, value2) | Data type of value1 or null |
| Returns null if input value1 equals value2 , otherwise returns value1 . For example:
|
try(expression) | null |
| Evaluates an input expression and handles certain types of errors by returning null . These possible errors are handled by try :
|