Find out the 3rd highest salary?

Answer Posted / suba

(Instead of 3 we can find N highest value)

select min(sal) from emp e where 3>(select count(sal) from
emp where sal>e.sal);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a design view?

716


What are stored procedures used for?

745


How do I partition a table in sql?

748


What is clause?

807


what is recursive stored procedure? : Sql dba

727


what is a control file ? : Sql dba

769


What is Collation Sensitivity ? What are the various type ?

703


how to show all tables with 'mysql'? : Sql dba

829


How many tables can you join in sql?

720


Why is normalization important?

756


What are the advantages of stored procedure?

742


What is not equal in sql?

721


Does oracle roll back the transaction on an error?

760


What does count (*) do in sql?

739


Does pdo prevent sql injection?

710