Arithmetic - Operations on columns

Introduction to Modulus.

SQL can perform arithmetic operations like addition, subtraction, division or modulus.

Modulus is the remainder of a division between two numbers. It is represented by the symbol %.

Modulus  is sometimes also referred to as modulo.

Modulo is written as:

4 % 2

For example when dividing numbers say 10 and 3, results in a remainer of 1

While dividing numbers 7 and 4, results in a remainder of 3