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
Explain the blob datatype?
How to define an oracle sub procedure?
What is SQL access advisor in Oracle?
How to get execution path reports on query statements?
What happens to the current transaction if the session is killed?
How to display row numbers with the records?
How to write a query with a right outer join in oracle?
What happens to indexes if you drop a table?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
21. Using a set operator, display the client number of all clients who have ever placed an order and whose whose name does not contain the string Sm.
Explain the difference between a procedure and a function? What do you understand by those terms?
How many file formats are supported to export data?
What exactly do quotation marks around the table name do?
How to use an explicit cursor without open statements?
What is the usage of save points in oracle database?