IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Math Operators
editMath Operators
editThis functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
Perform mathematical operations affecting one or two values. The result is a value of numeric type.
-
Add (
+
)
SELECT 1 + 1 AS x;
-
Subtract (infix
-
)
SELECT 1 - 1 AS x;
-
Negate (unary
-
)
SELECT - 1 AS x;
-
Multiply (
*
)
SELECT 2 * 3 AS x;
-
Divide (
/
)
SELECT 6 / 3 AS x;
-
Modulo or Reminder(
%
)
SELECT 5 % 2 AS x;