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 get execution path reports on query statements?
why dont we assign not null constraint as table level constraint.
State the various uses of dbcc command?
How to use regular expression in pattern match conditions in oracle?
How to get a list of all user accounts in the database?
How to pass a cursor variable to a procedure?
How to open and close an explicit cursor in oracle?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
Explain alias?
What is ordinary table in oracle?
What are the differences between primary key and unique key?
defination of bitmap index
when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.
Explain the use of online redo log files in oracle.
What are the parameters that we can pass through a stored procedure?