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

ABOUT IDENTITY?

2023


How do I spool in oracle?

964


How to delete a column in an existing table?

1050


How to add a new column to an existing table in oracle?

1107


How to create a new view in oracle?

1035


Why oracle is used?

1022


What is a database table in oracle?

984


What is the difference between online and offline backups?

1008


How to connect to a remote server?

1087


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

2319


What is an oracle transaction?

1084


What is a schema in oracle?

988


What is PL/SQL ?

1959


How to grant create session privilege to a user in oracle?

964


What is an Oracle Instance?

1092