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
Menu
Decode « PL SQL « Oracle PL / SQL
Oracle PL / SQL
PL SQL
Decode
1.
Use decode function to deal with NULL value
2.
DECODE(x, search, result, default)
3.
DECODE() allows you to perform if-then-else logic in SQL without having to use PL/SQL
4.
DECODE() to compare 1 to 2, and since they are not equal 3 is returned
5.
If city equals 'New York', the string 'You are in New York' is returned, otherwise the string 'Not' is returned
6.
Multiple search and result parameters to DECODE()