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

Answer Posted / boby

select max(MAXI) from
(SELECT max(slno) AS MAXI FROM EMPLOYEE WHERE slno not IN(SELECT max(slno) FROM EMPLOYEE )
GROUP BY slno)a

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does sql profiler work?

574


what is commit? : Sql dba

619


Is primary key an index?

539


What do we need to check in database testing?

561


How would you reference column values before and after you have inserted and deleted triggers?

627






Is stored procedure faster than query?

566


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

1716


what is bdb (berkeleydb)? : Sql dba

574


Explain about various levels of constraint.

525


discuss about myisam key cache. : Sql dba

566


What is the difference between mdf and ndf files?

574


What is crud sql?

545


What is schema in sql example?

602


What are the types of records?

539


Does sql*plus also have a pl/sql engine?

563