Math Operators

edit

Perform mathematical operations affecting one or two values. The result is a value of numeric type.

Add (+)

edit
SELECT 1 + 1 AS x;

Subtract (infix -)

edit
SELECT 1 - 1 AS x;

Negate (unary -)

edit
SELECT - 1 AS x;

Multiply (*)

edit
SELECT 2 * 3 AS x;

Divide (/)

edit
SELECT 6 / 3 AS x;

Modulo or Remainder(%)

edit
SELECT 5 % 2 AS x;