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 the difference between the repeatable read and serializable isolation levels? : Transact sql

527


How does cross join work?

497


Enlist the data types that can be used in pl/sql?

566


What is error ora-12154: tns:could not resolve the connect identifier specified?

585


What does the sign mean in sql?

499






Does view store data in sql?

525


what are the different type of normalization? : Sql dba

548


What packages are available to pl/sql developers?

590


How many types of triggers are there in pl sql?

570


What are the datatypes available in pl/sql ?

605


What is the primary use of normalization?

520


What is recursive join in sql?

542


difference between anonymous blocks and sub-programs.

618


What are the advantages of indexing?

513


How to select all records from the table?

599