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

Answer Posted / khandu shinde

select a.sal
from (
select sal ,rownum no
from (
select distinct sal
from emp
order by sal desc
)
) a
where a.no=2

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various levels of constraints?

628


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

615


What is a composite primary key?

560


What are the events on which a database trigger can be based?

566


is mysql query is case sensitive? : Sql dba

538






Can we call dml statement in function?

515


How do I kill a query in postgresql?

523


How can you know that statistics should be updated?

572


How to combine two stored procedures in sql?

569


what is the difference difference between procedure and packages

9160


What are the disadvantages of file system?

594


How to place comments in pl/sql?

577


Write a unique difference between a function and a stored procedure.

504


Define implicit and explicit cursors.

608


Which version of sql do I have?

534