MOD gives you remainder.
Example
5 MOD 2
5 MOD 3
mysql> SELECT 5 MOD 2; +---------+ | 5 MOD 2 | +---------+ | 1 | +---------+ 1 row in set (0.00 sec) mysql> SELECT 5 MOD 1; +---------+ | 5 MOD 1 | +---------+ | 0 | +---------+ 1 row in set (0.00 sec) mysql> SELECT 5 MOD 3; +---------+ | 5 MOD 3 | +---------+ | 2 | +---------+ 1 row in set (0.00 sec)
No comments:
Post a Comment