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 the use of sqlerrd 3?

533


What is the use of double ampersand (&&) in sql queries? Give an example

623


What is difference between inner join and cross join?

530


How do rank () and dense_rank () differ?

530


How many indexes can be created on a table in sql?

503






how to check server status with 'mysqladmin'? : Sql dba

583


What is write ahead logging in sql server?

572


What is a call statement? Explain with an example.

555


What is the difference between a subquery and a join?

539


How does a covering index work?

539


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

730


what are the performance and scalability characteristics of mysql? : Sql dba

542


Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?

611


List the different type of joins?

582


What is a string data type in sql?

525