Thursday 19 June 2014

Third highest salary from table:-



Third highest salary from table:-
select a.Salary from (select Salary ,DENSE_RANK() over(order by Salary desc) as rk from money) as a where rk =3
way 2:-
select a.Salary from (select Salary ,ROW_NUMBER() over(order by Salary desc) as rk from money) as a where rk =3

No comments:

Post a Comment