नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Applies to: Databricks SQL
Databricks Runtime
Returns the remainder after dividend
/ divisor
. This function is equivalent to mod
function.
Syntax
dividend % divisor
Arguments
dividend
: An expression that evaluates to a numeric.divisor
: An expression that evaluates to a numeric.
Returns
If both dividend
and divisor
are 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.
Examples
> SELECT 2 % 1.8;
0.2
> SELECT 2 % 0;
Error: DIVIDE_BY_ZERO