| Sign In/My Account | View Cart |
| Subject: | how do we find nth highest in SQL | |
| Date: | 2005-10-17 23:28:21 | |
| From: | Apurva_Sharma | |
|
Response to: how do we find nth highest in SQL
|
||
|
Hi, Solution to your query.Plz follow steps.
|
||
Showing messages 1 through 1 of 1.
I think this is also correct,
but can't u try this out, which is more simple :-
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
Enter value for n: 2
SAL
---------
3700