how to retrieve the top 2 salaried persons from a database?

Answer Posted / arun

select salary from(select salary from(select distinct salary from employees order by salary desc) where rownum<=2 order by salary) where rownum=1;

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 sql prepared statement?

544


How does an execution block start and end in pl sql?

500


what is bdb (berkeleydb)? : Sql dba

574


What are the parameter modes supported by pl/sql?

534


Are subqueries faster than joins?

577






What is nvarchar max in sql?

582


What is the difference between rollback and rollback to statements?

586


What is sql in java?

545


What is microsoft t sql?

489


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

548


What does sign mean sql?

573


What is left inner join in sql?

519


What is sql rowcount?

559


What are reports usually used for?

566


What is a primary key? Explain

542