ZEROIFNULL function replaces NULL values with 0.
Quick Example:
SELECT ZEROIFNULL(NULL); -- Result: 0
Summary information:
Syntax | ZEROIFNULL(expression) | |
Alternatives | CASE WHEN expression IS NULL THEN 0 ELSE expression END | CASE is ANSI SQL compliant |
Related Functions:
NULLIFZERO | Replace 0 values with NULL |
Last Update: Teradata 13.0
Replacing NULL values with 0 in other databases:
Oracle:
NVL(expression, 0) | CASE WHEN expression IS NULL THEN 0 ELSE expression END |