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

What is oracle thin client?

532


How to set up autotrace for a user account?

592


Explain the use of indexes option in exp command.

590


How to add another datafile to a tablespace?

576


what is the difference between restoring and recovering?

556






What is the best way to do multi-row insert in oracle?

561


How to find the duplicate rows count from employees table in oracle?

543


What are the varoius components of physical database structure of oracle database?

567


What is the usage of synonyms?

581


HI, Please let me know the syllabus for Oracle OCA and OCP Certification

1951


How can we find out the current date and time in oracle?

641


How to write a left outer join with the where clause in oracle?

624


Why does Oracle not permit the use of PCTUSED with indexes?

1949


Explain oracle insert into command?

626


what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?

1846