NULLIFZERO
Purpose
This function returns the value NULL if number has value 0. Otherwise, a number is returned.
Syntax
nullifzero::=
Usage Notes
- The
NULLIFZEROfunction is equivalent to theCASEexpressionCASE WHEN number=0 THEN NULL ELSE number END. - Additionally, refer to ZEROIFNULL.
Example
Copy
SELECT NULLIFZERO(0) NIZ1, NULLIFZERO(1) NIZ2;