ZEROIFNULL
Purpose
This function returns 0
if number has value NULL
. Otherwise, number is returned.
Syntax
zeroifnull::=
Usage Notes
- The
ZEROIFNULL
function is equivalent to theCASE
expression -CASE WHEN number is NULL THEN 0 ELSE number END
. - Additionally, refer to NULLIFZERO.
Example
Result
ZIN1 | ZIN2 |
0 | 1 |