ABS or ABSVAL function

The ABS or ABSVAL function returns the absolute value of a numeric expression.

The return type is the type of the parameter. All built-in numeric types are supported (DECIMAL, DOUBLE PRECISION, FLOAT, INTEGER, BIGINT, NUMERIC, REAL, and SMALLINT).

Syntax

ABS ( numericExpression )
ABSVAL ( numericExpression )

Example

-- returns 3
VALUES ABS(-3)