how to find nth highest salary

Answer Posted / suhail qaiser

SELECT TOP Nth salary
FROM (
SELECT TOP N salary
FROM emp
ORDER BY salary DESC
) TmpTable
ORDER BY salary ASC

Is This Answer Correct ?    38 Yes 56 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete a database in ms sql server?

563


Explain what are magic tables in sql server?

538


What is difference between standardization and normalization?

532


Is it possible to replicate data from sql server to oracle? : sql server replication

545


What is dbcc?

735






What is the Difference Between Primary and Foreign Key?

587


How do use Having,Group by,Group function in SQL?

1358


Can you explain different types of joins?

547


What are the different types of sql server replication? : sql server replication

624


How to enter comments in transact-sql statements?

553


What is indexing a document?

555


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

500


Explain the third normal form(3nf)?

523


Tell me the phases a transaction has to undergo?

550


Why we need to use secondry database file? though, we can do same work using primary database file also.

5772