ABS function [Numeric]

Returns the absolute value of a numeric expression.

Syntax
ABS( numeric-expression )
Parameters
  • numeric-expression   The number whose absolute value is to be returned.

Returns

An absolute value of the numeric expression.

Numeric-expression data type Returns

INT

INT

FLOAT

FLOAT

DOUBLE

DOUBLE

NUMERIC

NUMERIC

Standards and compatibility
  • SQL/2003   SQL foundation feature outside core SQL.

Example

The following statement returns the value 66.

SELECT ABS( -66 );