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 / amit golia

SELECT min(sal) FROM(SELECT DISTINCT(sal) FROM emp ORDER
BY sal DESC) WHERE ROWNUM<=2;

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to end the current transaction in oracle?

1072


What are transaction isolation levels supported by oracle?

1117


What to do if dba lost the system password?

1248


How to convert numbers to characters in oracle?

1080


What is a database schema in oracle?

1153


How to connect the oracle server as sysdba?

1132


What are the restrictions on external table columns?

1110


why should i declare foreign key constraint as self relation instead of binary relation in tables ?

2092


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

1095


What is clustered table in Oracle?

1262


What do you mean by cdb and pdb in oracle 12c?

1102


Difference between open_form and call_form in oracle.

1224


What is columnar storage what is the advantage?

1122


How to use regular expression in pattern match conditions in oracle?

1076


What is the difference between a hot backup and a cold backup in oracle?

1079