ABS Function in Teradata

ABS function calculates the absolute value of a given value.

ABS Function in Teradata Syntax

ABS(number_value)

ABS Function in Teradata Example

SELECT ABS(10);
Output: 10

SELECT ABS(-10);
Output: 10

SELECT ABS(+10)
Output: 10

Teradata ABS function converts the negative value to positive, and when a positive value is provided, it returns the same value without modification.

If the input value is a string, the value is converted to float value.

SELECT ABS('+76');
Output: 76.00