Link Search Menu Expand Document

MOD

Calculates the remainder after dividing two values, <num> / <den>.

Syntax

MOD(<value_n>,<value_d>)

Parameters

Parameter Description Supported input types
<value_n> The numerator of the division equation DOUBLE PRECISION
<value_d> The denominator of the division equation DOUBLE PRECISION

Return Type

DOUBLE PRECISION

Example

The following example returns the remainder of 45 and 7:

SELECT
    MOD(45, 7);

Returns: 3