find the third highest salary?

Answer Posted / nripesh agarwal

select * from emp where salary=(select distinct salary from
emp order by salary desc limit n,1)


// for Nth highest value put n=N-1....
//for 3rd highest put n=2........

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is union?

817


What is rtm stands for?

746


What is scalar function?

775


What is auto increment feature in sql?

819


What are secondary keys?

737






Which one is better subquery or joins?

775


What is sql deadlock?

741


How do I create a sql database?

710


what are the system privileges that are required by a schema owner (user) to create a trigger on a table?

813


What kind of join is join?

704


What is the difference between microsoft sql and mysql?

709


What are the different types of sql commands?

787


Explain unique key in sql.

738


What are user defined functions?

762


How do I find duplicates in sql?

691