Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Select name of employee with max salary for given dept..

436954Jul 9 2009 — edited Jul 12 2009
hello..

This one seems and should be easy..

for a given department I need to find the name of the person with the maximum salary

the following obviously will not work as it does not include the name

select max(salary), dept
from emp
group by dept
having dept = '1234';

How can I get the name of the employee with the max salary ?

Cheers for the help folks..

Will
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2009
Added on Jul 9 2009
9 comments
23,809 views