Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateInternal functions → MOD()
Firebird Home Firebird Home Prev: MINVALUE()Firebird Documentation IndexUp: Internal functionsNext: NULLIF()

MOD()

Tip

Find a more recent version at Firebird 5.0 Language Reference: 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).

Prev: MINVALUE()Firebird Documentation IndexUp: Internal functionsNext: NULLIF()
Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateInternal functions → MOD()