웹이야기

MySQL SIGN() 본문

D/MySQL

MySQL SIGN()

yeon.Biju 2020. 3. 29. 19:52

SIGN(X)

 

Returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive.

 

 

mysql> SELECT SIGN(-23), SIGN(0), SIGN(234) ;
+-----------+---------+-----------+
| SIGN(-23) | SIGN(0) | SIGN(234) |
+-----------+---------+-----------+
|        -1 |       0 |         1 |
+-----------+---------+-----------+
1 row in set (0.00 sec)

 

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

MySQL TRUNCATE()  (0) 2020.03.29
MySQL SIN()  (0) 2020.03.29
MySQL ROUND()  (0) 2020.03.29
MySQL RAND()  (0) 2020.03.26
MySQL MOD()  (0) 2020.03.26
Comments