How to retrieve 5th highest sal from emp table?

Answer Posted / amit bhagat

select min(a.sal) from (select distinct(d.sal) from emp
order by d.sal desc) a where rownum<=5

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create an oracle database?

588


I just want to maintain data like an employee can belongs to 3 or more departments . We can resolve this by using composite key but it avoids normalization rules. So Can anyone tell me how can I maintain data.

1704


What privilege is needed for a user to insert rows to tables in another schema?

562


What is the difference between count (*), count (expression), count (distinct expression)?

561


How many types of database triggers exist?

577






List out the difference between commit, rollback, and savepoint?

622


Describe varray?

592


What do you mean by cdb and pdb in oracle 12c?

641


How to create a table interactively?

562


How to create an initialization parameter file?

543


In oracle there is column command, how will you explain that?

554


What are the differences between blob and clob in oracle?

586


What is the meaning of recursive hints in oracle?

532


What are the ansi data types supported in oracle?

521


I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?

1976