| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|||
SELECT ROWNUM AS RANK,D.SALARY |
|
|||
|
You can calculate the 2,3,4 or the whichever highest value of a column you want to retrive:
select min(sal) from (select sal from emp where sal is not NULL order by sal desc) where rownum<=&rownum; |
![]() |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find second highest value of a column in a table? | ruby | SQL - Questions and Answers | 23 | 05-07-2008 05:51 AM |
| How to find second highest value of a column in a table? | SQL? | jaheer | SQL - Questions and Answers | 10 | 07-24-2007 11:07 AM |
| how to find third highest record from table? | davinder singh | SQL - Questions and Answers | 3 | 12-19-2006 11:57 AM |