取数字n的符号,大于0返回1,小于0返回-1,等于0返回0
SQL> select sign( 100 ),sign(- 100 ),sign( 0 ) from dual;
SIGN(123 ) SIGN(- 100 ) SIGN( 0 )
--------- ---------- ---------
1 - 1 0
Java代码
SQL> select sign(100),sign(-100),sign(0) from dual;
SIGN(123) SIGN(-100) SIGN(0)
--------- ---------- ---------
1 -1 0