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 parameterized cursor in oracle?

1132


How to convert a date to char in oracle? Give one example.

1059


What is instant client oracle?

1017


How to create tables for odbc connection testing?

1103


What do you mean by merge in oracle and how can you merge two tables?

945


What is the use of file param in imp command?

1159


can u send the sql dumps to sivakumarr1987@gmail.com plz help me

3049


How to connect the oracle server as sysdba?

1072


Why should I use oracle database?

983


How to write an inner join with the where clause in oracle?

1041


What is a private synonym?

1580


How to use "in out" parameter properly?

1043


How to change user password in oracle?

1021


What is Redo Log Buffer in Oracle?

1198


Explain the features of oracle?

1038