需要有关Oracle Query的帮助

时间:2011-05-13 14:35:22

标签: sql-server-2005

我有一个带有字段的员工表 - EmpId,EmpName,Salary。 表包含8条记录。现在我想获得第三高薪。 可以请你提供查询

2 个答案:

答案 0 :(得分:1)

select * 
from (select * 
        from employee 
        order by salary desc) 
where rownum = 3;

答案 1 :(得分:0)

select * from (select DISTINCT salary from employee order by salary desc) where rownum = 3;