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 to restore performance issues and how to check?
How to create a new table in a given schema?
What is the return type of executeupdate ()?
What is sql or structured query language?
What do you understand by replication in sql server? Mention the different types of replication in sql server.
What is correlated subquery in sql server?
Do you know sql server 2008 introduces automatic auditing?
What does top operator do?
What is a unique index?
How you can minimize the deadlock situation?
How do database indexes work?
What is encryption key?
What is the command used to recompile the stored procedure at run time?
Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many
What are the recovery models for a database?