How to select the N<sup>th</sup> maximum salary from Table Emp in Oracle SQL Plus ?
Deepak Verma
Select an image from your device to upload
select * from emp
where sal=(select max(sal) from emp
where level=&level connect by prior sal>sal group bu level)
SELECT Salary FROM (SELECT ROWNUM AS SN, Salary FROM(SELECT DISTINCT Salary FROM Emp ORDER BY Salary DESC))WHERE SN = N;