Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / satya_k21

Hi,


Select * from emp e where 2>= (select count(sal) from
emp e where sal>=e.sal) order by desc.

Let me know if it is wrong..


Regards,
Satya.K

Is This Answer Correct ?    11 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What view means?

550


Why is the cursor important?

528


How do you know if a relationship is 2nf?

514


What is the difference between union and union all command?

540


is mysql query is case sensitive? : Sql dba

554






what is the difference between primary key and unique key? : Sql dba

518


What does pragma mean?

499


What is sql used for?

638


Which command is used to delete a package?

575


What is 19 null in sql?

526


What are the key differences between SQL and PL SQL?

621


Why use subqueries instead of joins?

595


How do I run pl sql in sql developer?

621


Explain sql data types?

617


What are aggregate and scalar functions?

519