MySQL MOD() Function

The mod() is a Math function of MySQL. This function is used to get the remainder of given values.

Syntax

Parameter:

n: number to be divided by m

m: number that will divide n

Returns

This function returns the remainder of n divided by m.

Example 1

Output:


MySQL Math MOD() Function

Example 2

Output:


MySQL Math MOD() Function

Example 3

Output:


MySQL Math MOD() Function
Next TopicMySQL Math




Latest Courses