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

Answer Posted / uday

Hi friends i think it is surely work because i worked for this.

select * from emp e where 1=(select count(distinct d.esal)
from emp d where d.esal>e.esal)

any one plz try if it's not work

plz let me know.
uday_testing@yahoo.co.in

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between a web-garden and a web-farm? : Sql dba

545


What is the difference between rollback and rollback to statements?

573


Mention what does the hierarchical profiler does?

548


What is the mutating table and constraining table?

544


Which is better join or inner query?

508






what is sql server agent? : Sql dba

596


How to move files from one directory to another in pl sql?

635


Does sql*plus have a pl/sql engine?

559


What are the different operators available in sql?

557


What's the procedure?

481


How to execute a stored procedure?

552


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

499


What is sql query optimization?

535


Difference between table function and pipelined function?

574


what is a join? : Sql dba

555