%
(percent sign) operator
Applies to: Databricks SQL Databricks Runtime
Returns the remainder after dividend
/ divisor
. This function is equivalent to mod function.
Arguments
dividend
: An expression that evaluates to a numeric.divisor
: An expression that evaluates to a numeric.
Returns
If both dividend
and divisor
are of DECIMAL, the result matches the divisor’s type.
In all other cases, a DOUBLE.
If divisor
is 0 (zero) the function raises a DIVIDE_BY_ZERO error.