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

What is oracle datasource?

993


When do you get a .pll extension in oracle?

1146


What is a database table in oracle?

1024


How to use "in" parameter properly?

1075


What is a named program unit?

1088


What is a cognitive schema?

973


Is there a combination of "like" and "in" in sql?

1067


Oracle

2380


Explain an index?

1140


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

2267


Explain a segment?

1093


Explain the use of ignore option in imp command.

1038


Why does oracle 9i treat an empty string as null?

1060


How to create a stored procedure in oracle?

1106


what is Single Byte Overhead...?

2560