MySQL Tutorial/Math Numeric Functions/Modulo
Modulo operation (%): Returns the remainder of N divided by M.
mysql>
mysql> select 5%2;
+------+
| 5%2 |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
mysql>
mysql> select 5%2;
+------+
| 5%2 |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>