Arithmetic Operations

This section provides a list of numeric operations supported by SQL and some examples.

As any other computer languages, SQL defines 4 types of arithmetic operations:

• Addition: numeric_value + numeric_value - It returns the sum of both numeric values.
• Subtraction: numeric_value - numeric_value - It returns the difference between the first value and the second value.
• Multiplication: numeric_value * numeric_value - It returns the result of first value multiplied by the second value.
• Division: numeric_value / numeric_value - It returns the result of the first value divided by the second value.
• Integer division: numeric_value DIV numeric_value - It returns the largest integer from the result of the first integer value divided by the second integer value.
• Modulo: numeric_value MOD numeric_value - It returns the remainder of the first integer value divided by the second integer value.

Examples arithmetic operations:

```10 + 3 -- 3
10 - 3 -- 7
10 * 3 -- 30
10 / 3 -- 3.333333...
10 DIV 3 -- 3
10 MOD 3 -- 1
```