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

How to define a specific record type?

632


Which is better Oracle or MS SQL? Why?

4000


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

571


Please explain oracle left join with an example?

591


How to define an anonymous procedure with variables?

560






What are the oracle built-in data types?

572


What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

1816


Explain parameter file in oracle.

586


Explain joins in oracle?

571


When do you get a .pll extension in oracle?

683


How to use "out" parameter properly?

640


 What are the oracle DML commands possible through an update strategy?

592


How to view the data files in the current database?

608


What is index in Oracle?

604


defination of bitmap index

1636