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 a call statement? Explain with an example.

745


Explain what is a field in a database and record in a database?

790


How does index help in query performance?

762


What is a design view?

700


What is lookup table in sql?

765






Which join is default?

712


Explain the uses of control file.

775


How do I install microsoft sql?

717


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

777


Difference between global and parameter variables?

1656


What are system versioned tables?

738


Can we insert data into view?

681


Can you do multiple joins in sql?

729


How do I run a pl sql procedure in sql developer?

692


What is sql procedures and functions?

746