Oracle MOD

Function Description

Function MOD returns the remainder of argument x divided by argument y. Oracle function MOD
is calculated as x – y * FLOOR(x/y)

Examples

SELECT MOD(10, 2)
  FROM dual;

Result: 0

SELECT MOD(10, 3)
  FROM dual;

Result: 1

SELECT MOD(-10.5, 3)
  FROM dual;

Result: -1,5

SELECT MOD(-10.5, -3)
  FROM dual;

Result: -1,5
This entry was posted in Oracle SQL Functions. Bookmark the permalink.