I would like to share my knowledge
and open to recieve knowledge from
others.
Thursday, 27 December 2012
How to find second highest salary using cte?
second highest salary with cte as ( select salary,ROW_NUMBER() over (order by salary desc) as 'rownum' from dbo.employee ) select salary from cte where rownum=2
No comments:
Post a Comment