SQL SIGN Function
SQL SIGN function tells user about the sign of numeric value. SQL SIGN function returns either 1 or -1 depending on whether the number is positive or negative respectively. The syntax is:
SIGN (number);
Examples:
The following statements illustrate the use of SQL SIGN function on couple different numbers:
SELECT SIGN ( 6) FROM DUAL;
OUTPUT:
SELECT SIGN (-3) FROM DUAL;
OUTPUT:
SELECT SIGN (-3.123124) FROM DUAL;
OUTPUT:
SELECT SIGN (54.2342342) FROM DUAL;
OUTPUT: