Modulo Operator (%)
Return the remainder of one number divided by another. N % M is the same as MOD(N,M) and N MOD M.
Syntax
N % MDescription
Modulo operator. Returns the remainder of N divided by M. See also MOD.
Examples
SELECT 1042 % 50;
+-----------+
| 1042 % 50 |
+-----------+
| 42 |
+-----------+The operands can be decimals:
SELECT 0.5 % 0.33;
+------------+
| 0.5 % 0.33 |
+------------+
| 0.17 |
+------------+See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?

