how to find nth highest salary
Answer Posted / dinesh
select distinct(a.salary)
from Salarydtls a
where 3= (select distinct(count(b.salary))
from salarydtls b
where a.salary<=b.salary)
ans is for third highest sal
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How to update multiple rows with one update statement in ms sql server?
How do I view a trc file?
Define Joins?
What are the tools available in market as an alternative to sql server reporting services?
Define cursor locking
Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What is the difference between ‘having’ clause and a ‘where’ clause?
Explain about builtinadministrator?
Is it possible to have clustered index on separate drive from original table location?
What is SQL Azure Fabric?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
How to create a simple user defined function in ms sql server?
How to defragment indexes with alter index ... Reorganize?
What is the difference between osql and query analyzer?
How to execute a sql statement using odbc_exec()?