ABS

Returns the absolute value of the argument.

Returns the absolute value of the argument. The return value has the same data type as the argument..

Behavior type

Immutable

Syntax

ABS ( expression )

Arguments

expression
Resolves to a value of type INTEGER or DOUBLE PRECISION.

Examples

SELECT ABS(-28.7);
 abs
------
 28.7
(1 row)