Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL SIGN Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 342 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?