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
Difference between inner join vs where ?
What is a trigger oracle?
How can we find out the current date and time in oracle?
How to list all indexes in your schema?
How to generate query output in html format?
What is a proxy class?
Explain the use of consistent option in exp command.
What happens if you use a wrong connect identifier?
what is a Nested Loop join?
How to lock and unlock a user account in oracle?
Whether any commands are used for months calculation? If so, what are they?
What is SQL Tuning Advisor in Oracle?
Explain the use of parfile option in exp command.
how can db_files > maxdatafiles since db_files is for instance and the later is for database
Describe an oracle table?