how to find nth highest salary

Answer Posted / guru

select max(salary) from Employee where salary not in(select
top (n-1) salary from Employee order by salary desc)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is resultset an interface?

632


How do I view a script in sql server?

626


How to execute stored procedure in select statement sql server?

618


What is user-defined functions? What are the types of user-defined functions that can be created?

655


Can You Use A Stored Procedure To Provide Data To An Ssrs Report?

119






what's the difference between a primary key and a unique key? : Sql server database administration

593


What is the maximum number of instances in 32 bit and 64 bit sql server 2012?

649


Please differentiate between a local and a global temporary table?

651


What is normalization and what are the advantages of it?

599


What is the order in which the sql query is executed?

614


Why is normalisation important?

594


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

663


Define primary key?

764


Explain logical operators in sql server?

664


What are cursors stored procedures and triggers?

595