Query to get max and second max in oracle in one query ?
Answer Posted / satish
SELECT SAL SECOND_MAX_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
What is procedure overloading in oracle?
How to define a specific record type?
What to do if the startbd.bat failed to start the xe instance?
Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?
What are the attributes of cursor?
What are oracle functions?
What is a oracle database?
What is proxy method?
Explain drop constraint oracle?
How to convert characters to dates in oracle?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
How to upsert (update or insert into a table)?
How to create a stored function in oracle?
How do I spool to a csv formatted file using sqlplus?
How to create a stored program unit?