Query to get max and second max in oracle in one query ?
Answer Posted / purna chowdary
Select Sal From Emp A
WHERE 1=(Select Count(Sal) From Emp B
WHERE B.Sal>A.sal)
GROUP By Sal Desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
List the various oracle database objects?
How to display row numbers with the records?
How to set up autotrace for a user account?
What are nested tables?
What happens to the current transaction if the session is killed?
When do you get a .pll extension in oracle?
What are the extensions used by oracle reports?
What is the difference between "as" and "is" in an oracle stored procedure?
what is port in oracle? how is it related to database application.
Describe varray?
What is a trace file and how is it created in oracle?
What is oracle data type?
What is the usage of synonyms?
How index is implemented in oracle database?
Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?