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

How to define an oracle sub procedure?

1134


What are the parameters that we can pass through a stored procedure?

1058


What are the logical operations?

1117


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

2114


What is an index associated with a constraint?

1028


What are the various constraints used in oracle?

1037


what is IDE,DMV in sql server?

2810


Why is oracle database so popular?

988


What is an oracle tablespace?

1034


Explain the use of online redo log files in oracle.

1034


What is java oracle used for?

1016


What is varray?

1124


How to get execution statistics reports on query statements?

1080


Which is better Oracle or MS SQL? Why?

6371


What are the attributes of the cursor?

995