Register now or log in to join your professional community.
SELECT * FROM(SELECT ROWNUMBER()OVER(ORDER BY SALARY DESC)RN,SAL FROM EMP )
WHERE RN=10;
select top 10 a.salary
from (
select distinct top salary from emp order by salary desc
)a
order by a.salary
SELECT TOP1 salary
FROM (
SELECT DISTINCT TOP salary
FROM EMP
ORDER BY salary DESC) a
ORDER BY salary