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 is a cognitive schema?

978


How many categories of data types in oracle?

1031


Can a formula column be obtained through a select statement ?

2333


What is a sub query? What are its various types?

1183


What are the database administrators utilities available?

1037


How do I know if oracle is installed on windows?

932


What is merge statement used for?

1030


How to convert characters to times in oracle?

1023


Explain oracle’s server parameter file.

998


How to load excel data sheet to oracle database

1030


How to run create database statement again?

1160


How to execute the package in oracle?

1085


How to define a variable of a specific record type?

1080


Is rowid unique in oracle?

1003


What is the purpose of tables, private synonyms and public synonyms in Oracle?

1048