Home
Oracle PL / SQL
Aggregate Functions
Analytical Functions
Char Functions
Constraints
Conversion Functions
Cursor
Data Type
Date Timezone
Hierarchical Query
Index
Insert Delete Update
Large Objects
Numeric Math Functions
Object Oriented Database
PL SQL
Regular Expressions
Report Column Page
Result Set
Select Query
Sequence
SQL Plus
Stored Procedure Function
Subquery
System Packages
System Tables Views
Table
Table Joins
Trigger
User Previliege
View
XML
SIGN « Numeric Math Functions « Oracle PL / SQL
Oracle PL / SQL
Numeric Math Functions
SIGN
1.
SIGN: Returns 1 if the argument is positive, 0 if the argument is negative
2.
SIGN(0)
3.
-SIGN(x): Returns -1 if x is negative, 1 if x is positive, or 0 if x is zero
4.
SIGN(5)
5.
Use sign function in user-defined function
6.
select sign( 100 - ( 50 * 2 ) ) "Using expressions"
7.
select sign( 123 * -1 + 122) "Using expressions"
8.
Use SIGN in PL/SQL statement