how to retrieve the top 3 salaries of the table using rownum

Answer Posted / raghunanda

SELECT * FROM(SELECT * FROM EMP ORDER BY SAL DESC) WHERE ROWNUM<=3;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to display the records between two range in Oracle SQL Plus?

645


Do stored procedures prevent sql injection?

552


Mention what are the benefits of pl/sql packages?

542


How do I view a sql trace file?

568


What does count (*) mean in sql?

1095






Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

597


What is sql used for?

647


What is sql exception?

520


what is column? : Sql dba

576


What is structural independence and why is it important?

551


What is the difference between python and sql?

524


What is out parameter used for eventhough return statement can also be used in pl/sql?

588


How do I run pl sql in sql developer?

630


what are the differences among rownum, rank and dense_rank? : Sql dba

542


What is the use of count (*) in sql?

551