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

The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio

525


What is sql profiler. What are the default templates with it? : sql server database administration

520


Write a code to select distinct records without using the DISTINCT keyword.

648


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

552


What is a trigger? Why we need it?

532






How to drop an existing schema in ms sql server?

591


How to execute a sql statement using mssql_query()?

545


How to use column default values in insert statements in ms sql server?

530


What are commonly used odbc functions in php?

540


What stored by the tempdb ? : sql server database administration

566


What stored procedure would you use to view lock information?

528


How to check parameter value in stored procedure sql server?

464


What is a join in sql?

590


What are the methods used to protect against sql injection attack?

576


What is logshipping and its purpose?

560