how to find nth highest salary

Answer Posted / neeraj kumar

select top(1) salary from(
select distinct nth salary
from emp
order by salary desc)a
order by salary



In this answer you can put any position in place of nth then you find the salary.
If you are satisfied this answer then reply me please.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to transfer data from a cursor to variables with a "fetch" statement?

593


Explain foreign key in sql server?

593


Can You Use Data Mining Models In Ssrs?

99


Tell me what is fill factor?

562


What is the difference between row_number and dense_rank?

451






What is simple indexing method?

588


What is ems sql management studio? : sql server management studio

596


i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.

1383


How to write character string constants or literals in ms sql server?

555


What does null mean?

613


Can I work with several databases simultaneously? : sql server management studio

573


What is the sql case statement used for?

574


How to enable tcp/ip protocol on a sql server?

600


What are the types of indexing?

607


How to find the service pack installed? : sql server database administration

562