I have employee table with empname, dept,salary
----------------------------------------------------------
in this i want to get highest salary paid employee in each dept
output as like
empname dept salary
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joginder BangerPosted Feb 7, 2015, 12:40 PM
select top 1 * from employee group by dept order by salary desc