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
How to define an oracle sub procedure?
What are the parameters that we can pass through a stored procedure?
What are the logical operations?
Which environment variables are absolutely critical in order to run the OUI?
What is an index associated with a constraint?
What are the various constraints used in oracle?
what is IDE,DMV in sql server?
Why is oracle database so popular?
What is an oracle tablespace?
Explain the use of online redo log files in oracle.
What is java oracle used for?
What is varray?
How to get execution statistics reports on query statements?
Which is better Oracle or MS SQL? Why?
What are the attributes of the cursor?