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 define a record variable to store a table row?
How to lock and unlock a user account in oracle?
State the difference between a primary key and foreign key?
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?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
What are the differences between char and varchar2 in oracle?
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
Why we use bulk collect in oracle?
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
IS it possible to built the oracle database without setting the kernal parameters?
How to update values on multiple rows in oracle?
Can I create users through internet explorer in oracle 10g?
How to do clean up if create database failed?
How to use fetch statement in a loop?
How do I use os authentication with weblogic jdriver for oracle and connection pools?