Returns the absolute value of an arithmetic value.
ABS(x)
x is an arithmetic expression.
ABS(-132) /* returns 132 */ ABS(12.5) /* returns 12.5 */
The ABS function may produce unexpected results when x is fixed binary and has the maximum negative value for its precision. For example, if x is Fixed Binary(15) and has the value -32768, ABS(x) is -32768.
Description
ABS(x) returns the absolute value of x.
The result has the same data type and precision as x.