how to find nth highest salary
Answer Posted / anand patel.
It is a very generic and easy way to find the Nth higest
salary with there employee/s name.
select * from emp where salary =
(select max(salary) from emp where salary in
(select top (select (count(*)-(n-1))from emp) salary
from emp order by salary))
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Benefits of Stored Procedures?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
What is collation sensitivity?
How to loop through returning rows?
where can you add custom error messages to sql server? : Sql server administration
What is sql server programming?
What is merge statement?
What is the difference between upgrade and migration in sql server?
How does recursive cte works in sql server?
Define self join in sql server joins?
Do you know what is openxml in sql server?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
Give me any three differences between Truncate and Delete.
Can primary key be null?
What is the difference between drop table and truncate table?