| Author |
find second largest value in a column
|
rakesh repala
Greenhorn
Joined: May 23, 2008
Posts: 5
|
|
please help me find the second largest value in a column write a query using oracle 8i
|
rakesh
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Hi Rakesh, Did you try to write such a query yourself? Can you show us how far you got? Regards, Jan
|
OCUP UML fundamental
ITIL foundation
|
 |
rakesh repala
Greenhorn
Joined: May 23, 2008
Posts: 5
|
|
select sal from emp e1 where 2=(select count* from emp e2 where e1.sal>e2.sal) regards ------
|
 |
pradeep singh
Ranch Hand
Joined: Oct 23, 2007
Posts: 339
|
|
Hi Select sal from (select max(sal) from emp) where ROWCOUNT<=1 order by sal desc I think it will work fine to get second highest salary .
|
SCJP 5.0(75%), SCWCD 5.0(88%)
|
 |
 |
|
|
subject: find second largest value in a column
|
|
|