Categories: Math
ABS
Computes the absolute value of a numeric expression. The return type matches the input type. Returns NULL if the input is NULL.
Syntax
ABS(numeric_expression NUMERIC) → NUMERIC
- numeric_expression: The numeric value to compute the absolute value for.
Examples
ABS exampleSELECT ABS(0.0)
-- 0.0
SELECT ABS(-2)
-- 2
SELECT ABS(NULL)
-- null