メインコンテンツまでスキップ
バージョン: 4.x

ABS

説明

xの絶対値を返します

構文

ABS(<x>) 

パラメータ

Parameterデスクリプション
<x>絶対値を計算する値

Return Value

パラメータxの絶対値。

Example

select abs(-2);
+---------+
| abs(-2) |
+---------+
| 2 |
+---------+
select abs(3.254655654);
+------------------+
| abs(3.254655654) |
+------------------+
| 3.254655654 |
+------------------+
select abs(-3254654236547654354654767);
+---------------------------------+
| abs(-3254654236547654354654767) |
+---------------------------------+
| 3254654236547654354654767 |
+---------------------------------+