SIGN(x) gets the sign of x. SIGN() returns -1 if x is negative, 1 if x is positive, or 0 if x is zero. : SIGN « Numerical Math Functions « Oracle PL/SQL Tutorial






The following example displays the sign of -5, 5, and 0, respectively:

SQL>
SQL> SELECT SIGN(-5), SIGN(5), SIGN(0) FROM dual;

  SIGN(-5)    SIGN(5)    SIGN(0)
---------- ---------- ----------
        -1          1          0

SQL>








14.18.SIGN
14.18.1.SIGN(x) gets the sign of x. SIGN() returns -1 if x is negative, 1 if x is positive, or 0 if x is zero.
14.18.2.Use SIGN function to deal with column data
14.18.3.SIGN(-5)
14.18.4.SIGN(5) (2)
14.18.5.SIGN(0)