# MOD function in Oracle

MOD is one of the vital Numeric/Math functions of Oracle. It is used to get the remainder of x divided by y. The MOD function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

MOD ( x, y )


Parameters:
x, y: They are used to specify the numbers to be used for calculation.

Example 1:

MOD (10, 2)

Output:

0


Explanation:
The MOD is calculated as [x – (y * floor (x/y))].

Example 2:

MOD (10, 3)

Output:

1


Explanation:
The MOD is calculated as [x – (y * floor (x/y))].

Example 3:

MOD (10.5, 3)

Output:

1.5


Explanation:
The MOD is calculated as [x – (y * floor (x/y))].