NULLIFZERO
functionsupportedCore SQL functionsReturns NULL if the argument evaluates to 0; otherwise, returns the argument.
Syntax
NULLIFZERO( <expr> )
Parameters
| Name | Required | Description |
|---|---|---|
expr | required | The input should be an expression that evaluates to a numeric value. |
Returns
If the value of the input expression is 0, this returns NULL. Otherwise, this returns the value of the input expression. The data type of the return value is NUMBER(p, s) (if the input is a fixed-point number) or DOUBLE (if the input is a floating point number). For fixed-point numbers, the exact values of ‘p’ (precision) and ‘s’ (scale) depend upon the input expression. For example, if the input expression is 3.14159, then the data type of the output value will be NUMBER(7, 5).