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

What do you know about normalization? Explain in detail?

882


What exactly do quotation marks around the table name do?

918


What is proxy method?

931


What language does oracle use?

1049


How many data types are supported?

1028


What is meant by raw datatype?

1005


How to Truncate Table in Oracle

1094


What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

2078


What is a system tablespace?

1008


What is index-organized table in Oracle?

1021


How to create a new oracle data file?

972


What is a cursor and what are the steps need to be taken?

1119


What is coalesce function?

1009


When do you get a .pll extension in oracle?

1078


Calculate difference between 2 date / times in oracle sql?

987