Skip
Arish's avatar

120. Modulo Operator


Modulo Operator (%)

Returns remainder after division.

sql
1SELECT 10 % 3;  -- Returns: 1
2SELECT 15 % 4;  -- Returns: 3

Use Cases

  • Check even/odd numbers
  • Cyclic patterns
  • Grouping by intervals