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 / satish

SELECT SAL SECOND_MAX_SAL FROM (SELECT SAL,DENSE_RANK() OVER(ORDER BY SAL DESC) RANK FROM EMP) WHERE RANK=2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to define an oracle cursor variable?

993


How to assign a table row to a record variable?

992


Is there a combination of "like" and "in" in sql?

1030


How to define an anonymous procedure without variables?

1061


What is Java Pool in Oracle?

1120


What is an oracle wallet?

911


How to pass parameters to procedures?

999


How to apply filtering criteria at group level in oracle?

1012


How to convert characters to dates in oracle?

1056


What happens in oracle commit?

985


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1830


What is oracle latest version?

1052


What are group functions in oracle?

997


Which are the five query types available in oracle?

923


What do you mean by merge in oracle?

959