abs

Returns the absolute value of a numeric expression.

Syntax

abs( <expr> )

Arguments

<expr> must be int, uint, or float.

Returns

Returns the same numeric type as the input.

Examples

SELECT abs(-12), abs(12::uint), abs(-1.25);