Returns the remainder of dividing two numbers (modulo operation).
Same as input typeDiperbarui: 13 Jun 2026MOD(dividend, divisor)The number to be divided
The number to divide by
1 SELECT 2 MOD(10, 3) as mod_result, 3 MOD(17, 5) as another_mod, 4 MOD(-10, 3) as negative_mod;
Calculates the remainder after division.
| mod_result | another_mod | negative_mod |
|---|---|---|
| 1 | 2 | -1 |
1 SELECT 2 row_number, 3 CASE WHEN MOD(row_number, 2) = 0 THEN 'even' ELSE 'odd' END as row_type 4 FROM `project.dataset.data`;
Determines even/odd rows for styling.
Sudah paham MOD? Latih langsung di browser
Latihan interaktif, langsung di browser.