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

SELECT MAX(E1.sal), MAX(E2.sal)
FROM emp E1, (SELECT sal FROM emp
WHERE sal NOT IN ( SELECT MAX(sal) FROM emp)) E2

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.

2253


What is Java Pool in Oracle?

1154


What is a sub query? Describe its types?

1011


Point the difference between translate and replace?

1079


What are data pump export and import modes?

1058


Can multiple columns be used in group by in oracle?

971


Hi Can any one tell me what are the API's used in requisition import.

1917


what is the difference between restoring and recovering?

1007


What happens to the indexes if a table is recovered?

989


Can you have more than one content canvas view attached with a window ?

2323


How to connect to oracle using service name instead of sid?

1007


What is bulk collect in oracle?

989


Query to retrieve record for a many to many relationship ?

2504


What operating systems are supported by oracle database 10g xe?

1028


material view and view disadvantages?

1057