top of page
116
MySQL 8.0
SIGN
Syntax:
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(-32);
-> -1
mysql> SELECT SIGN(0);
-> 0
mysql> SELECT SIGN(234);
-> 1
bottom of page