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

Explain what are the different type of segments?

970


How can we find out the current date and time in oracle?

1093


How to turn on or off recycle bin for the session?

1113


How to drop a stored procedure in oracle?

1056


What is Reduced List of Values?

2174


What are the various types of snapshots ?

1032


What is a sub query and what are the different types of subqueries?

1129


1) Does oracle have any table which contain all the exceptions and it's code internally?

1755


Can we commit inside a function in oracle?

968


How to resolve name conflicts between variables and columns?

1035


Give the advantages and disadvantages of clusters.

1052


Is it possible to insert comments into sql statements return in the data model editor ?

2569


What are the different types of partitions in oracle?

980


How to define an external table with a text file?

1076


Explain drop constraint oracle?

1075