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 memory optimized?

556


What is pl/sql table? Why it is used?

560


Why plvtab is considered as the easiest way to access the pl/sql table?

619


What is t sql used for?

551


Explain dml and ddl?

552






What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

551


How do you write a subquery?

523


what is the different between now() and current_date()? : Sql dba

526


What is data type in sql?

556


what is normalization? : Sql dba

561


How do I start sql profiler?

559


how to install mysql? : Sql dba

580


what is a database lock ? : Sql dba

594


What are stored procedures used for?

537


How do I find duplicates in sql?

507