Declaration
MOD(N,M)
Description
Remainder function. The three forms MOD(N,M), N % M, and N MOD M are equivalent.
The MOD() function also works for numbers with decimal parts, returning the exact remainder after division.
If either N or M is NULL, the return value is NULL. If M is 0, NULL is also returned.
Examples
obclient> SELECT MOD(29,19), 29 MOD 19, 29 % 19;
+------------+-----------+---------+
| MOD(29,19) | 29 MOD 19 | 29 % 19 |
+------------+-----------+---------+
| 10 | 10 | 10 |
+------------+-----------+---------+
1 row in set