웹이야기

MySQL ABS() 본문

D/MySQL

MySQL ABS()

yeon.Biju 2020. 3. 26. 18:59

ABS(X)

 

Returns the absolute value of X.

 

This function is safe to use with BIGINT values.

 

 

mysql> SELECT ABS(2) ;
+--------+
| ABS(2) |
+--------+
|      2 |
+--------+
1 row in set (0.25 sec)

mysql> SELECT ABS(-32) ;
+----------+
| ABS(-32) |
+----------+
|       32 |
+----------+
1 row in set (0.01 sec)


'D > MySQL' 카테고리의 다른 글

MySQL CONV()  (0) 2020.03.26
MySQL CEIL(), CEILING()  (0) 2020.03.26
MySQL Mathematical Functions  (0) 2020.03.26
MySQL Arithmetic Operators  (0) 2020.03.26
MySQL Control Flow Functions  (0) 2020.03.19
Comments