Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Returns the positive value of a given number, regardless of sign.
ABS ( expression )
The absolute value of the expression.
SELECT ABS(-9);
+---------+
| ABS(-9) |
+---------+
| 9 |
+---------+
SELECT ABS(9);
+--------+
| ABS(9) |
+--------+
| 9 |
+--------+
SELECT ABS(20-50);
+------------+
| ABS(20-50) |
+------------+
| 30 |
+------------+