أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
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