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 foreign key in sql with example?

515


What is partition in sql query?

521


Is primary key always clustered index?

541


How can I speed up sql query?

528


How to run sql functions in pl/sql?

545






Is a view faster than a stored procedure?

550


What are different sql data types?

516


what are date and time functions in mysql? : Sql dba

541


Does truncate need commit?

520


what is the difference between char_length and length? : Sql dba

576


How can check sql version from command line?

536


What are all the ddl commands?

636


what are enums used for in mysql? : Sql dba

613


How does rowid help in running a query faster?

970


What do you mean by dbms? What are its different types?

557