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

Answer Posted / kirti

Very simple answer: Arrange the top two salaries in
decending order. Select the mininum salary.

Select min(salary) from Employee where salary in(select top
2 salary from employee order by salary desc)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an implicit commit?

561


What is an emotional trigger?

518


how do you know if your mysql server is alive? : Sql dba

602


How do you create an update query?

526


Why do we need unique key in a table?

529






What is the difference between the repeatable read and serializable isolation levels? : Transact sql

536


define data blocks ? : Sql dba

552


What are the benefits of stored procedures?

535


What is clustered and nonclustered index in sql?

504


How to read/write files from pl/sql?

582


Can a varchar be a primary key?

538


explain the difference between myisam static and myisam dynamic. : Sql dba

519


What is the difference between rename and alias?

711


What is trigger and types?

570


What are different types of functions in sql?

511