Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to define a record variable to store a table row?

1058


How to lock and unlock a user account in oracle?

1106


State the difference between a primary key and foreign key?

935


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?

1382


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

2205


What are the differences between char and varchar2 in oracle?

1170


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

2008


Why we use bulk collect in oracle?

1044


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1933


IS it possible to built the oracle database without setting the kernal parameters?

2348


How to update values on multiple rows in oracle?

1034


Can I create users through internet explorer in oracle 10g?

1084


How to do clean up if create database failed?

1028


How to use fetch statement in a loop?

1019


How do I use os authentication with weblogic jdriver for oracle and connection pools?

1051