Product Solutions Support
Try MemSQL

ABS

Returns the positive value of a given number, regardless of sign.

ABS ( expression )

Arguments

Return Type

The absolute value of the expression.

Examples

memsql> select abs(-9);
+---------+
| abs(-9) |
+---------+
|       9 |
+---------+

memsql> select abs(9);
+--------+
| abs(9) |
+--------+
|      9 |
+--------+

memsql> select abs(20-50);
+------------+
| abs(20-50) |
+------------+
|         30 |
+------------+
Was this article useful?