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 can we delete Duplicate row in table?

636


Define clusters?

652


Tell me what is difference between view and materialized view?

522


What happens if null values are involved in datetime operations?

537


how to control the amount of free space in your index pages? : Sql server database administration

598






List the different normalization forms?

542


How can I add Reporting Services reports to my application?

91


What is self contained scalar sub query?

540


What is the difference between varchar and nvarchar?

526


You have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation?

485


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

748


What is the difference between inner join and equi join?

491


What are security principals used in sql server 2005?

517


What are the various editions of sql server 2017 that are available in the market?

504


What are the different types of collation sensitivity?

555