ABS
Description
ABS is a mathematical function that returns the absolute (positive) value of a specified numeric expression.
ABS changes negative values to positive values. ABS has no effect on zero or positive values.
One exception is the minimum integer value, which is mapped to itself (because of Two's complement).
Syntax
ABS ( table.column )
NULL handling
If the input value is NULL, the result is NULL as well.
Example
[1] ABS with one negative value and one null value | ||||||||||||||
| ||||||||||||||
|
[2] ABS for the minimum value (negative) is also negative (because of Two's Complement). | ||||||||
| ||||||||
|