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

Answer Posted / rajkumar

select top 1 colmn from table_name where colmn in
(select top 2 colmn from table_name where colmn is not
null order by colmn desc)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does sql profiler work?

753


How to know the last executed procedure?

809


What is the difference between the sql*loader and import utilities? : aql loader

757


What are the two types of exceptions in pl/sql?

733


Mention what problem one might face while writing log information to a data-base table in pl/sql?

871






How do I run a program in pl sql?

701


What are the different tcl commands in sql?

815


Can you join views in sql?

719


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

777


Is left join inner or outer by default?

761


What is the use of partition by in sql?

715


Explain what is table in a database?

783


What is the sql case statement?

749


Explain what is a column in a table?

764


What are the basic sql commands?

747