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
What is a oracle database?
What is a view and how is it different from a table?
What is an oracle recycle bin?
Can we call procedure inside function in oracle?
What is a user account in oracle?
What is oracle database 10g express edition?
Select all the employees who were hired in last 2 years and who works in dept where max managers are working.
How to convert characters to numbers in oracle?
What is oracle used for?
How to retrieve data from an explicit cursor?
How do we create privileges in oracle?
What is the quickest way to fetch the data from a table?
How to select all columns of all rows from a table in oracle?
How to convert csv to table in oracle?
What do you mean by redo log file mirroring?