meta data for this page
  •  

MOD()

Available in: DSQL, PSQL

Added in: 2.1

Description

Returns the remainder of an integer division.

Result type: INTEGER or BIGINT

Syntax

MOD (a, b)
  • Non-integer arguments are rounded before the division takes place. So, 7.5 mod 2.5 gives 2 (8 mod 3), not 0.

Important: If the external function MOD is declared in your database, it will override the internal function. To make the internal function available, DROP or ALTER the external function (UDF).