示例
mysql>SELECT SIGN(-4.65);
+---------------------------------------------------------+
| SIGN(-4.65) |
+---------------------------------------------------------+
| -1 |
+---------------------------------------------------------+
1 row in set (0.00 sec)
mysql>SELECT SIGN(0);
+---------------------------------------------------------+
| SIGN(0) |
+---------------------------------------------------------+
| 0 |
+---------------------------------------------------------+
1 row in set (0.00 sec)
mysql>SELECT SIGN(4.65);
+---------------------------------------------------------+
| SIGN(4.65) |
+---------------------------------------------------------+
| 1 |
+---------------------------------------------------------+
1 row in set (0.00 sec)
尝试一下