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 / samir kumar sahoo

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

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to load excel data sheet to oracle database

1017


How to call a stored function in oracle?

1016


What suggestions do you have to reduce the network traffic?

954


Explain the use of ignore option in imp command.

1033


List out the components of logical database structure of oracle database.

1031


How to load data from external tables to regular tables?

1060


How to see free space of each tablespace?

1032


What is the purpose of save points in oracle database?

1104


Why do we use bulk collect in oracle?

1058


Explain the blob datatype?

1071


How to apply filtering criteria at group level in oracle?

1038


Write a syntax for update query in oracle?

1026


How to define a data field as not null?

1105


How to create a table index in oracle?

1130


How to define and use table alias names in oracle?

937