MOD (SYSFUN schema) scalar function

Returns the remainder of the first argument divided by the second argument.

Read syntax diagramSkip visual syntax diagramMOD(expression, expression)

The schema is SYSFUN.

The result is negative only if first argument is negative. The result of the function is:
  • SMALLINT if both arguments are SMALLINT
  • INTEGER if one argument is INTEGER and the other is INTEGER or SMALLINT
  • BIGINT if one argument is BIGINT and the other argument is BIGINT, INTEGER or SMALLINT.

The result can be null; if any argument is null, the result is the null value.