how will I find the first 5 highest salaried employees in
each dept in oracle.
Answer Posted / ravindra reddy
select *from(select b.* from emp b order by sal desc)where rownum<=5 order by sal desc
------------------------------------------------------------
select *from(select b.*,rank() over(order by sal desc) from emp b)where rownum<=5
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to write a query with a left outer join in oracle?
How to build data dictionary view an new database?
What is the difference between the Oracle ODBC driver and a Microsoft ODBC (Open Database Connectivity) Driver?
What are group functions in oracle?
What are the different types of partitions in oracle?
What is a package in oracle?
Explain an index?
Give the various rollback segment states.
How to increment dates by 1 in oracle?
Describe the types of sub query?
What is Trigger in Oracle?
State the various uses of dbcc command?
What are the built-in functions used for sending Parameters to forms ?
does the query needs a hint to access a materialized view?
In the oracle version 9.3.0.5.0, what does each number shows?