How to find 1st, 2nd, 3rd highest using select select
statement not using rownum

Answer Posted / ajit

select distinct *
from (select e.*,dense_rank()over(order by sal desc) rn from emp e)
where rn in (1,2,3);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain mutating triggers.

709


What is difference between truncate and delete?

651


How to set a transaction to be read only in oracle?

694


What is blob data type in oracle?

685


what is the difference between functional dependecy and multilevel dependency?

2102






What are the differences between date and timestamp in oracle?

674


Is there an oracle sql query that aggregates multiple rows into one row?

648


How to run create database statement again?

726


How to change program global area (pga) in oracle?

711


What is tns name?

663


What happens to the current transaction if a ddl statement is executed?

687


What do you understand by a database object? Can you list a few of them?

720


How to create lov dynamically at runtime & attach to text field?

792


How to convert characters to times in oracle?

695


Explain integrity constraint?

744