Query to get max and second max in oracle in one query ?
Answer Posted / bhamidipati srinivas
select (select max(gross) from employee_dtls),(select max
(gross) as nextmaximum
from employee_dtls where gross<(select max(gross) from
employee_dtls)) from dual
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
ABOUT IDENTITY?
How do I spool in oracle?
How to delete a column in an existing table?
How to add a new column to an existing table in oracle?
How to create a new view in oracle?
Why oracle is used?
What is a database table in oracle?
What is the difference between online and offline backups?
How to connect to a remote server?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
What is an oracle transaction?
What is a schema in oracle?
What is PL/SQL ?
How to grant create session privilege to a user in oracle?
What is an Oracle Instance?