how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / jas

select a.sal,a.emp_no from employee a
where 5=(select distinct(count(*) from
employee b where a.sal> b.sal)

Is This Answer Correct ?    8 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain alias?

715


What is a nested table and how is it different from a normal table?

582


What are the different pseudo commands? Explain in general?

541


Explain an exception?

568


What is set operator oracle?

529






What is parameterized cursor in oracle?

578


How a tablespace is related to data files?

583


What to do if the binary spfile is wrong for the default instance?

564


What privilege is needed for a user to create indexes in oracle?

578


Which is better Oracle or MS SQL? Why?

5440


What is varray?

587


What is key preserved table?

566


What is the purpose of save points in oracle database?

545


How do I find my oracle client driver version?

528


In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??

1366