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 temporary stored procedure?

551


What are the advantages of paper records?

559


when would you go for denormalization? : Sql server database administration

487


Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.

1970


What is subquery in sql?

573






What is database black box testing?

610


How to create view in stored procedure sql server?

507


explain databases and sql server databases architecture? : Sql server database administration

523


Which database stores information about replication?

559


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

544


How to create new tables with "create table" statements in ms sql server?

571


What is an indexed view?

584


How is foreign key related to primary key?

578


What is a covered index?

523


How to connect php with different port numbers?

555