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 run the anonymous block again?

595


How to speed up webrick?

595


What is the oracle implicit cursor?

596


What are the database administrators utilities available?

580


How much memory your 10g xe server is using?

582






What is translate in oracle?

623


How do I manually create a database in oracle?

548


How can you use check constraints for self referential integrity?

525


how may join possible between (requisition with purchase order)

1699


What is the fastest query method to fetch data from the table?

866


Why do you use stored procedures and state some of its disadvantages?

565


What is save point in oracle database?

730


Explain drop constraint oracle?

593


What is dynamic proxy?

554


How do I call oracle stored procedures that take no parameters?

567