The MOD() function returns the remainder derived by dividing two numbers.
mysql>
mysql>
MOD(<number1>, <number2>)
mysql>
mysql>
mysql> SELECT MOD(22, 7);
+------------+
| MOD(22, 7) |
+------------+
| 1 |
+------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category