Other related articles:

Recently viewed articles:

SQL MOD Function

SQL MOD function returns the remainder value which is a result of division of two numbers.

The syntax is

MOD(number, divider)

Examples:
The following SQL statements illustrate the use of SQL MOD function on couple different numbers:

SELECT MOD (34, 6) FROM DUAL;

OUTPUT:
sql mod image1

SELECT MOD (24, 4) FROM DUAL;

OUTPUT:
sql mod image2

SELECT MOD (4,12) FROM DUAL;

OUTPUT:
sql mod image3

SELECT MOD (-12,6) FROM DUAL;

OUTPUT:
sql mod image4