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
What are dml statements in oracle?
What do you mean by a deadlock?
What is oracle join syntax?
How to create id with auto_increment on oracle?
How to write a query with a left outer join in oracle?
Difference between cartesian join and cross join?
How can we view last record added to a table?
What is tns service name?
What is snapshot is too old? Give and example for better understand.
What are the differences between date and timestamp in oracle?
Can we insert data in view oracle?
What is the difference between 10g OEM and 11g OEM?
How do we represent comments in oracle?
How do you bind variables in oracle?
Explain the use of rows option in imp command.