Skip to main content
Version: 24.3.x

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