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

Why packages are used in oracle?

1064


what is IDE,DMV in sql server?

2810


What are the database administrators utilities available?

1024


What types of joins are used in writing subqueries?

976


State and explain the different types of data models?

935


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

1164


What is data type in oracle?

1111


What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.

1098


How many anonymous blocks can be defined?

1177


How to convert times to characters in oracle?

1021


Which environment variables are absolutely critical in order to run the OUI?

2114


How many file formats are supported to export data?

1209


What is parameterized cursor in oracle?

1132


What happens to the current transaction if a ddl statement is executed?

1006


How to count duplicated values in a column in oracle?

1036