| Article: |
SQL Data Types | |
| Subject: | Why doesn't the following query return me the nth highest value? | |
| Date: | 2005-07-28 07:34:41 | |
| From: | Suneel_Gundlapalli | |
|
select rownum,sal from (select distinct sal from emp order by sal desc) where rownum=&n;
|
||
Showing messages 1 through 1 of 1.
-
Why doesn't the following query return me the nth highest value?
2006-03-27 12:25:24 jaipalreddy [View]



just replace = with < . u will definetly get the solution.actually rownum is assigned after retrieving the row.there lies the problem.
anyway u try this. u will get it