| Subject: | how do we find nth highest in SQL | |
| Date: | 2004-12-11 08:17:00 | |
| From: | RuchirAwadhawal | |
|
Response to: how do we find nth highest in SQL
|
||
|
Query for Nth Max (Highest) select sal from emp t where &n = (select count(sal) from (select distinct sal from emp) where t.sal<=sal);
|
||
Showing messages 1 through 1 of 1.





"select sal from emp t
where &n = (select count(sal)
from (select distinct sal from emp)
where t.sal<=sal);"
it is working fine
could u please let me know how it works...
thanks and reguards
surendra