Employer Zone
Take a tour
Register
Login
,
Share with your friends
Advanced use of DECODE
Views
208
Author:
Saurabh_OCA (Saurabh Gupta)
View Profile
|
View other solutions by this author
Question / Problem
How can we get greater of two numbers using decode
Solution
Lets say two number A, B
SELECT DECODE(SIGN(A-B),1,A,-1,B,0,'EQUAL') FROM DUAL;
Applies to
Oracle 9i Sql
Rank It
N/A
0
1
2
3
4
5
6
7
8
9
10
Login to rank it
Report
Advertisement