how to find nth highest salary

Answer Posted / aman kaushal

select salary from customer order by salary desc limit n,1;

here n is the array value 1st highest value starts with 0
value and then 1.

e.g

find the 2nd highest salary.

select salary from customer order by salary desc limit 1,1;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is row-level compre?

722


you have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation? : Sql server administration

718


What is the recovery model?

729


Explain what are the authentication modes in sql server?

693


Where is my database stored on the hard disk in ms sql server?

783


What different steps will a sql server developer take to secure sql server?

739


What do you understand by the data quality services in sql server?

708


How to loop through result set objects using odbc_fetch_row()?

661


How to connect ms access to sql servers through odbc?

739


How to disable a login name in ms sql server?

764


Define tempdb database?

760


What is the purpose of the tempdb database?

762


What is format parameter in ssrs?

128


Does partitioning improve performance sql server?

658


What are different types of constraints?

702