SIGN(X) returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive : SIGN : Math Numeric Functions MySQL TUTORIALS


MySQL TUTORIALS » Math Numeric Functions » SIGN »

 

SIGN(X) returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive


mysql>
mysql> SELECT SIGN(-32);
+-----------+
| SIGN(-32|
+-----------+
|        -|
+-----------+
row in set (0.00 sec)

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

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

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Math Numeric Functions
» SIGN