MOD
Declaration
MOD(N,M)
Description
The MOD function. MOD(N,M), N % M, and N MOD M are equivalent.
The MOD() function also works with values that have a decimal part. It returns the exact remainder after the division.
If either N or M is NULL, the result is NULL. If M is 0, the result is also NULL.
Examples
SELECT MOD(29,19), 29 MOD 19, 29 % 19;
+------------+-----------+---------+
| MOD(29,19) | 29 MOD 19 | 29 % 19 |
+------------+-----------+---------+
| 10 | 10 | 10 |
+------------+-----------+---------+
1 row in set (0.001 sec)