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

Where actually sql azure database is hosted?

149


Explain about system stored procedure?

605


Does sql server 2000 full-text search support clustering?

510


Difference between drill down and drill through report.

547


Explain the rules for designing files and file groups in sql server?

552






What is the difference between clustered and non-clustered indexes in ms sql server?

495


What is the use of toad or sqldbx.?

727


how you can deploy an ssrs report?

127


How will you optimize a stored procedure optimization?

517


What is sql service broker?

592


Which are ddl commands?

545


What is the sql case statement used for?

563


I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration

684


Explain what is it unwise to create wide clustered index keys?

546


What is the difference between having clause and where clause in sql server?

576