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 / purna chowdary

Select Sal From Emp A
WHERE 1=(Select Count(Sal) From Emp B
WHERE B.Sal>A.sal)
GROUP By Sal Desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the various oracle database objects?

1062


How to display row numbers with the records?

1087


How to set up autotrace for a user account?

1062


What are nested tables?

1178


What happens to the current transaction if the session is killed?

992


When do you get a .pll extension in oracle?

1154


What are the extensions used by oracle reports?

1045


What is the difference between "as" and "is" in an oracle stored procedure?

999


what is port in oracle? how is it related to database application.

1952


Describe varray?

1064


What is a trace file and how is it created in oracle?

1064


What is oracle data type?

973


What is the usage of synonyms?

1151


How index is implemented in oracle database?

1010


Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?

1388