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

Answer Posted / prasanna

select * from emp where 2(select count(distinct sal) from
emp e 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 the difference between $message and $$message? : Sql dba

553


Explain ttitle and btitle.

674


What is sql indexing?

557


Which is better join or subquery?

609


Can we commit inside a trigger?

552






How do I create a memory optimized filegroup?

533


What is sql and db2?

538


Can one improve the performance of sql*loader? : aql loader

587


How do you declare a variable in pl sql?

537


How do you modify a trigger?

530


What is a clob in sql?

569


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

599


How do you truncate?

507


How to use sql statements in pl/sql?

586


Why we use joins in sql?

544