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

Answer Posted / muneer ahamed

select rownum as rank,sal from (select rownum,sal from emp
order by sal desc)
where rownum<4

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to read/write files to-and-from PL/SQL?

657


How can you select unique records from a table?

524


Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints

648


How do you determine the current isolation level? : Transact sql

584


Why do we use view in sql?

536






What company owns postgresql?

562


What is a constraint?

570


Is coalesce faster than isnull?

512


Can you call pl/sql package functions from within a fast formula?

568


What is clustered index in sql?

592


What is pl sql and why it is used for?

575


how to escape special characters in sql statements? : Sql dba

518


How you improve the performance of sql*loader? : aql loader

582


What is database white box testing and black box testing?

641


How can you fetch first 5 characters of the string?

554