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

Will you be able to store pictures in the database?

630


hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.

1746


When do you get a .pll extension in oracle? Explain its importance

566


What are the differences between char and varchar2 in oracle?

556


How to use subqueries with the in operator using oracle?

601






How to define a sub function?

658


How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

2720


Is it possible to insert comments into sql statements return in the data model editor ?

2061


what is Single Byte Overhead...?

2055


How do I know if oracle is installed on windows?

480


How to open and close an explicit cursor in oracle?

569


How to add another datafile to a tablespace?

570


What are the different editions of oracle?

582


How to use "out" parameter properly?

625


How to rename a column in an existing table?

609