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

Answer Posted / seema

select sal from (select distinct sal from emp order by sal
desc ) where rownum < 3;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the use of set statement in tsql? : Transact sql

740


Can a table have no primary key?

774


What is join view in sql?

698


What are sql procedures?

759


What are tables and fields in the database?

752






How many parts of a pl sql block are optional?

713


How can I tell if sql is running?

761


Why is a primary key important?

730


What is the importance of sqlcode and sqlerrm?

1058


What is mutating table error?

882


How do I write a sql query in pgadmin 4?

712


What is difference between table and view?

706


What is difference between left and right outer join?

722


Can we join same table in sql?

738


What is record data type?

677