Learn SQL

Arithmetic - Operations on columns

26.1

Lesson

# Introduction to Modulus.

SQL can perform arithmetic operations like addition, substraction, 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