|
|
|
|
|
|
Re: Finding the Nth highest Salary value of given Employee Table [message #373698 is a reply to message #372600] |
Wed, 02 May 2001 06:01 |
Muralidhar Adapala
Messages: 1 Registered: May 2001
|
Junior Member |
|
|
Please check your previous responses. There will be some problem in the output. If you try writing in the below manner you can get an exact output. But please remember, if you are looking for any performance related problems, then better go for PL/SQL Procedure only.
Solution:
SQL> select empno, ename, sal from emp a
where &n > (select count(distinct(sal))
from emp b
where b.sal > a.sal)
/
|
|
|
|
|