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
How to view the data files in the current database?
How do you find out from the RMAN catalog if a particular archive log has been backed-up?
How to view all columns in an existing table?
What is a trace file and how is it created in oracle?
List the types of joins used in writing subqueries?
How to put more than 1000 values into an oracle in clause?
How to use "while" statements in oracle?
What is the quickest way to fetch the data from a table?
Explain the different normalization forms?
How do you tell what your machine name is and what is its IP address?
In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col
How to see free space of each tablespace?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
How to use select statement to count the number of rows in oracle?
what is IDE,DMV in sql server?