8.2.15. MOD()
Available in
DSQL, PSQL
Possible name conflict
YES → Read details
Syntax
MOD (a, b)
Parameter | Description |
---|---|
a | An expression of a numeric type |
b | An expression of a numeric type |
Result type
SMALLINT
, INTEGER
or BIGINT
depending on the type of a. If a is a floating point type, the result is a BIGINT
.
Description
Returns the remainder of an integer division.
- Non-integer arguments are rounded before the division takes place. So, “
mod(7.5, 2.5)
” gives 2 (“mod(8, 3)
”), not 0.