Skip to main content
Version: current [24.3.x]

ABS

Categories: Math

ABS

Computes the absolute value of a numeric expression.

Syntax

ABS(numeric_expression NUMERIC) → NUMERIC

  • numeric_expression: BINARY, DECIMAL, DOUBLE, FLOAT, INTEGER

Examples

ABS example
SELECT ABS(0.0)
-- 0.0
ABS example
SELECT ABS(-2)
-- 2
ABS example
SELECT ABS(NULL)
-- null