Query to get max and second max in oracle in one query ?
Answer Posted / amit golia
SELECT min(sal) FROM(SELECT DISTINCT(sal) FROM emp ORDER
BY sal DESC) WHERE ROWNUM<=2;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to end the current transaction in oracle?
What are transaction isolation levels supported by oracle?
What to do if dba lost the system password?
How to convert numbers to characters in oracle?
What is a database schema in oracle?
How to connect the oracle server as sysdba?
What are the restrictions on external table columns?
why should i declare foreign key constraint as self relation instead of binary relation in tables ?
What do you mean by merge in oracle and how can we merge two tables?
What is clustered table in Oracle?
What do you mean by cdb and pdb in oracle 12c?
Difference between open_form and call_form in oracle.
What is columnar storage what is the advantage?
How to use regular expression in pattern match conditions in oracle?
What is the difference between a hot backup and a cold backup in oracle?