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...

Anybody can tell me, how do we find second largest emp
salary from emp table.. Thanks in advance ...

Answer Posted / hemalatha

Following is the query to find the nth maximum salary:

select * from emp
where sal=(select distinct(sal) from emp a
where &n=(select count(sal)from emp
where sal>=a.sal;))

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to export your connection information to a file?

1076


Write a trigger example in oracle?

983


What is oracle and what are its different editions?

1008


ABOUT IDENTITY?

2006


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2903


What is the difference between pre-select and pre-query?

1125


How to connect ms access to oracle servers?

947


How to define an oracle cursor variable?

977


What are the different types of database objects?

993


How do I spool to a csv formatted file using sqlplus?

966


Does oracle database need java?

945


How index is implemented in oracle database?

946


Explain mutating triggers.

974


Explain the blob datatype?

1016


can u plz provide me oca sql dumps please i need them

1901