The sign function oracle

Syntax size comparison function sign:
sign (n-)

Function:
the sign of the number n, greater than 0 return 1, -1 is less than 0, equal to 0 returns 0

示例:
1、select sign( 100 ),sign(- 100 ),sign( 0 ) from dual;

  SIGN(100) SIGN(-100) SIGN(0)
  ———- ———- ———-
  1 -1 0

2, a = 10, b = 20
  then the sign (ab) -1

Guess you like

Origin www.cnblogs.com/houchen/p/12112469.html