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
How retrieve field names from the table in SQL through JAVA code?
How you can change the database name in SQL SERVER?
How to list all user names in a database?
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
Differentiate between ms sql server reporting services vs crystal reports?
What is SQL Server?
What do we need queues in sql service broker?
What is the use of commit?
What is recompile sql server?
What is sql server database?
What is the purpose of a table?
Define full outer join?
What is table join?
How to list all tables in the database using odbc_tables()?
What is nolock hint in sql server 2008