Query to get max and second max in oracle in one query ?
Answer Posted / satish
SELECT SAL FROM (SELECT SAL,DENSE_RANK() OVER(ORDER BY SAL DESC) RANK FROM EMP) WHERE RANK=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to assign query results to variables?
Where do you use decode and case statements?
Briefly explain what is literal? Give an example where it can be used?
How different is ms access and oracle?
how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?
Is oracle a programming language?
What are the different types of modules in oracle forms?
How do I know if oracle client is installed on windows?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
How to use like conditions in oracle?
How much memory your 10g xe server is using?
For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?
What is a read only transaction in oracle?
Explain what are synonyms used for?
List the various oracle database objects?