Quick Search:
 
 The Oracle PL/SQL SIGN Function      [Return To Index] Jump to:  

Term: SIGN

Definition:
In Oracle PL/SQL, SIGN is a built in function used to determine the sign (positive, negative or zero) of a numeric input. It identifies the sign of a number as -1 for negative, +1 for positive and 0 for zero, based on the conditions outlined below:

For an input 'n', the sign is:

-1 if n < 0
0 if n = 0
1 if n > 0

Example Syntax:

SIGN(number)


Example Usage:

The SQL statement below determines the sign of '-10':

SELECT SIGN(-10) FROM DUAL;

SIGN
----------
-1



Related Links:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org