how to find nth highest salary

Answer Posted / kunal gupta

select top 1 sal from (select top n sal from tbl_master
group by sal order by sal desc)m order by sal

This answer is easiest and 100% tested

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we solve concurrency problems?

674


Explain go command in sql server?

637


Can two tables have the same primary key?

693


How to create a view with data from multiple tables?

667


What is a trigger what are the advantages of trigger?

612






How many types of functions are there in sql server?

537


What is multi-statement table-value user-defined function?

612


How to enter unicode character string literals in ms sql server?

654


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

3898


How to add additional conditions in SQL?

671


What are the restrictions applicable while creating views? : SQL Server Architecture

664


Why do we partition data?

698


How to turn on the mssql api module in php?

664


When cursors are useful?

654


What is the function of inner join?

648