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
What do you mean by authentication modes in sql server?
Sql server reporting services vs. Crystal reports.
What is difference between rownum and row_number?
How many types of schemas are there?
How can i Relate Tables in SSIS
Explain sub-query?
Please differentiate between a local and a global temporary table?
Can a stored procedure call itself or recursive stored procedure? How many levels sp nesting is possible?
Where are sql server usernames and passwords stored in the sql server?
What do you mean by table and field in sql?
what is difference between NULL and ISNULL in SQL Server 2008?
Explain how many normalization forms?
What is forward - only cursors / read only cursor?
What does REVERT do in SQL Server 2005?
What is the maximum size per database for sql server express?