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
How can we delete Duplicate row in table?
Define clusters?
Tell me what is difference between view and materialized view?
What happens if null values are involved in datetime operations?
how to control the amount of free space in your index pages? : Sql server database administration
List the different normalization forms?
How can I add Reporting Services reports to my application?
What is self contained scalar sub query?
What is the difference between varchar and nvarchar?
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?
What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
What is the difference between inner join and equi join?
What are security principals used in sql server 2005?
What are the various editions of sql server 2017 that are available in the market?
What are the different types of collation sensitivity?