Pramod Raising
Friday, 8 June 2018
2 Second highest salary find sql query
select top 1 * from [dbo].[TblEmployee] where salary in (
select top 2 max(a.salary) from [TblEmployee] a group by a.salary order by a.salary desc
)
select * from [dbo].[TblEmployee]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment