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 is the limitation on the block size of pl/sql?

532


Why do we use %rowtype & %type in plsql?

608


how to create a new table in mysql? : Sql dba

548


What is rank dense_rank and partition in sql?

539


What is trigger in sql?

582






Define overloaded procedure?

622


what is the difference between char and varchar data types? : Sql dba

539


How exception is different from error?

543


How can I see all tables in sql?

547


Can triggers stop a dml statement from executing on a table?

618


Is sql difficult?

745


what is a unique key ? : Sql dba

547


Why do we use partitions in sql?

547


How many functions are there in sql?

542


What is primary key secondary key alternate key candidate key?

546