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
What are the various oracle database objects?
How to get execution statistics reports on query statements?
How to get a create statement for an existing table?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
What are group functions in oracle?
What is connection pool in oracle?
How to create a single index for multiple columns?
Can we connect to ORACLE db using Windows Authentication?
In what script is snap$ created? In what script is the scott/tiger schema created?
How to connect the oracle server as sysdba?
What is the difference between count (*), count (expression), count (distinct expression)?
How can we delete duplicate rows in a table?
How to write date and time interval literals in oracle?
What is snapshot is too old? Give and example for better understand.
How to load excel data sheet to oracle database