The Oracle and PL/SQL SIGN function returns a value indicating the sign of a number.
SIGN(n)
If n< 0, then SIGN(n) returns -1. If n= 0, then SIGN(n) returns 0. If n> 0, then SIGN(n) returns 1.
Example 1:
SELECT SIGN(-89) FROM DUAL;
returns:
-1
The Oracle and PL/SQL SIGN function returns a value indicating the sign of a number.
SIGN(n)
If n< 0, then SIGN(n) returns -1. If n= 0, then SIGN(n) returns 0. If n> 0, then SIGN(n) returns 1.
Example 1:
SELECT SIGN(-89) FROM DUAL;
returns:
-1