MOD (modulo) returns the remainder of a division operation. The return data type is the same as the arguments.
Syntax
MOD (
expression1,
expression2 )
Semantics
expression1 |
specifies the dividend (INTEGER or DOUBLE PRECISION) |
expression2 |
specifies the divisor (type same as dividend) |
Notes
6/2 = 3
the dividend is 6. The divisor is 2.
Examples
MOD(9,4)
Result: 1