Query to get max and second max in oracle in one query ?

Answer Posted / subodh tiwari

SELECT ENAME,SAL FROM (SELECT ENAME,SAL FROM EMP ORDER BY
SAL DESC) WHERE ROWNUM<=2

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write numeric literals in oracle?

627


Explain alias?

723


How to define a specific record type?

632


please explain.. DB architecture ...

1568


How to write a query with a right outer join in oracle?

631






Does oracle partitioning improve performance?

563


Explain the use of show option in imp command.

650


Write a syntax for update query in oracle?

628


What exactly do quotation marks around the table name do?

556


How to drop a stored function?

686


What is meant by an index?

637


Is java required for oracle client?

556


how to make an oracle object

1870


What is the difference between hot backup and cold backup in oracle? Tell about their benefits also.

553


Can multiple columns be used in group by in oracle?

555