how to find nth highest salary
Answer Posted / aravinda
try with this query you will get desired position salary.
Select Salary From Employees a Where 1=(
Select Count(Distinct Salary) From Employees b
Where a.Salary <= b.Salary );
just replace where clause number for desired position. ,2,3,4
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does the update command do?
What is use of dbcc commands?
What is the dbcc command and why is it used?
What is the difference between inner join and equi join?
Explain about Normalization?
What is trigger and different types of Triggers?
How does a profiler work?
Which language is supported by sql server?
Can a stored procedure call itself or recursive stored procedure? How many levels sp nesting is possible?
What are sql azure firewall rules?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
how many clustered indexes can be created on a table? : Sql server database administration
How to use group functions in the select clause in ms sql server?
Do you know what is blocking?
What is difference in performance between insert top (n) into table and using top with insert?