if_null¶
Description¶
Return the second argument if the first argument has the null value. Arguments must have the same type.
Return type¶
arg
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
if_null(arg, replacement)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
arg |
storable |
no |
no |
none |
replacement |
arg |
no |
no |
none |
Examples¶
make_col foo:if_null(foo, 0)
Replace the value of column ‘foo’ with the value 0 if the value is null.
Aliases¶
ifnull
(deprecated)