how to find nth highest salary

Answer Posted / rabi

SELECT A.SAL
FROM TABLE A WHERE &N=(SELECT COUNT(DISTINCT(B.SAL))
WHERE A.SAL<=B.SAL);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the bookmark lookup and rid lookup?

572


What is xml datatype?

653


How to modify the underlying query of an existing view?

534


What is the importance of concurrency control?

665


What is the difference between varchar and nvarchar datatypes?

572






What is the difference between primary key and unique constraints?

512


What is the rdl file?

88


How do I manually uninstall an instance of sql server 2016?

547


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

532


How to find the list of fixed hard drive and free space on server?

568


How to return the top 5 rows from a select query in ms sql server?

592


What are partitioned views and distributed partitioned views?

602


Explain the different types of backups available in sql server? : sql server database administration

520


How do I determine how many instances of sql server are installed on a computer?

535


Explain the concept of recursive stored procedure.

497