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 / subodh tiwari

SELECT ENAME,SAL FROM (SELECT ENAME,SAL FROM EMP ORDER BY
SAL DESC) WHERE ROWNUM<=2

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

2202


How to loop through a cursor variable?

1041


How to pass a cursor variable to a procedure?

1066


What are the different types of failures that occur in Oracle database?

1035


What is a private synonym?

1546


What are ddl statements in oracle?

1031


What are the various constraints used in oracle?

1010


What is logical backup in oracle?

986


How do I start tns listener?

1006


What is the difference between count (*), count (expression), count (distinct expression)?

977


if you ctreate table identity

2339


How can I combine multiple rows into a comma-delimited list in oracle?

1020


How a tablespace is related to data files?

1078


How to convert times to characters in oracle?

999


What is Java Pool in Oracle?

1117