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

How do sql triggers work?

550


What is a pragma statement?

717


Is crud a cuss word?

544


Why use triggers in sql?

497


What is the advantage of nosql?

525






What are the two virtual tables available at the time of database trigger execution?

632


How do I run a sql query?

528


Why is sql important?

577


What is the difference between local variables and global variables?

607


What is rank dense_rank and partition in sql?

535


What is difference between pls_integer and integer?

516


Is a table valued function object?

577


What is lookup table in sql?

601


How do you get column names only for a table (sql server)?

663


How many sql statements are used? Define them.

573