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 are the important architecture components of SSRS?

94


What is amo? : sql server analysis services, ssas

669


What is normalization? Explain its different types?

599


What is the use of RDBMS?

591


Define views.

590






I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?

601


Explain security with sql azure?

161


What is report snapshot?

99


What are information schema views?

551


how many type of indexing in database?

579


Differentiate between SQL and ORACLE joins and write their syntax.

589


When would you use sql joins?

526


Define Wed Edition in SQL Azure?

80


What are types of storage modes? : sql server analysis services, ssas

581


What are the options which must be set to allow the usage of optimistic models?

513