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

Does facebook use oracle?

573


What types of joins are used in writing subqueries?

565


How to convert a date to char in oracle? Give one example.

585


Is truncate autocommit in oracle?

635


How to use "in out" parameter properly?

612






What is oracle rowcount?

578


How to load data from external tables to regular tables?

539


What are the uses of linked server and explain it in detail?

586


What is a system tablespace?

598


Difference between hot backup vs. Cold backup?

606


How to update values in a table in oracle?

579


What are the advantages of oracle?

549


How to best split csv strings in oracle 9i?

586


Does oracle partitioning improve performance?

550


How to delete a column in an existing table?

593