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 / subodh tiwari

SELECT ENAME,SAL FROM (SELECT ENAME,SAL FROM EMP ORDER BY
SAL DESC) WHERE ROWNUM<=2

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to do paging with oracle?

993


Difference between open_form and call_form in oracle.

1155


Explain an exception?

991


What is blob data type in oracle?

1115


How to create a new user account in oracle?

1012


How to define and use table alias names in oracle?

937


How does one get the view definition of fixed views/tables?

1017


What is an oracle transaction?

1127


Can we commit inside a function in oracle?

960


How to define a data source name (dsn) in odbc manager?

1022


What is a view and how is it different from a table?

1041


6. Display the client name and order date for all orders using the traditional method.

2301


How to drop an index?

952


How to use attributes of the implicit cursor in oracle?

1005


What is a tns service name?

1003