DIV0NULL

functionsupportedCore SQL functions

docs.snowflake.com ↗

Numeric functions

Performs division like the division operator (/), but returns 0 when the divisor is 0 or NULL (rather than reporting an error or returning NULL).

Syntax

DIV0NULL( <dividend> , <divisor> )

Parameters

NameRequiredDescription
dividendrequiredNumeric expression that evaluates to the value that you want to divide.
divisorrequiredNumeric expression that evaluates to the value that you want to divide by.

Returns

The quotient. If the divisor is 0 or NULL, the function returns 0.

See also

Referenced by