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

select sal from employee where sal >= (select max(sal) from
employee where sal not in (select max(sal) from employee))

Is This Answer Correct ?    7 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

2071


When do you get a .pll extension in oracle? Explain its importance

1007


What is parameterized cursor in oracle?

1089


Explain what does a control file contain?

1061


How do you bind variables in oracle?

946


How to declare a local variable?

1073


Is it possible to split the print reviewer into more than one region ?

2240


What is a read only transaction in oracle?

988


Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.

2278


What is pragma autonomous transaction in oracle?

1018


How to end the current transaction in oracle?

986


Explain table?

1083


Write a syntax for update query in oracle?

991


Give the constructs of a package, function or a procedure.

1005


What are the different oracle database objects?

1053