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 sql trigger example?

543


How is debugging done?

531


What is microsoft t sql?

489


Can you do multiple joins in sql?

548


What is pl sql architecture?

504






what is “go” in t-sql? : Transact sql

603


What are keys in sql?

551


What is varchar example?

576


What is a unique key and primary key and foreign key?

569


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

666


How do I save a stored procedure?

526


What are pl sql data types?

551


How does postgresql compare to oracle/db2/ms sql server/informix?

569


What is a sql instance vs database?

579


How to use transactions efficiently : transact sql

548