ABS
Descriptionβ
Returns the absolute value of x
Syntaxβ
ABS(<x>)
Parametersβ
Parameter | Description |
---|---|
<x> | The value for which the absolute value is to be calculated |
Return Valueβ
The absolute value of parameter x
.
Exampleβ
select abs(-2);
+---------+
| abs(-2) |
+---------+
| 2 |
+---------+
select abs(3.254655654);
+------------------+
| abs(3.254655654) |
+------------------+
| 3.254655654 |
+------------------+
select abs(-3254654236547654354654767);
+---------------------------------+
| abs(-3254654236547654354654767) |
+---------------------------------+
| 3254654236547654354654767 |
+---------------------------------+