Query to get max and second max in oracle in one query ?
Answer Posted / samir kumar sahoo
SELECT sal FROM(SELECT DISTINCT(sal) FROM employees ORDER
BY sal DESC) WHERE ROWNUM<=2;
| Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
How to import one table back from a dump file?
How can we find out the current date and time in oracle?
What are the restrictions in a oracle read only transaction?
What is logical backup in oracle?
what is the dual table in oracle?
List the various oracle database objects?
if you ctreate table identity
What are internal user account in oracle?
What is recycle bin in Oracle?
Whether any commands are used for months calculation? If so, what are they?
What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?
Can we commit inside a function in oracle?
What is the difference between pre-select and pre-query?
How do I find my oracle client driver version?