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

Answer Posted / babbu

it's easy with self join:
select max(sal) from emp e1,emp e2 where e1.sal < e2.sal

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oracle and pl sql?

665


Explain how can you save or place your msg in a table?

597


What is multiple columns?

576


How to call a javascript function from pl sql?

567


What is record type in pl sql?

552






how to start mysql server? : Sql dba

615


Differentiate between pl/sql and sql?

621


Is a foreign key always unique?

536


what is sp_pkeys? : Transact sql

705


What is sqlcontext?

553


What does t sql mean?

538


What is trigger in pl sql?

564


Explain sql data types?

629


How can you select unique records from a table?

524


What are the basic techniques of indexing?

577