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

Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / gaurav mishra

The answer query is......

Select max(sal) from emp a where (&N-1) in(select count
(distinct(b.sal)) from emp b where a.sal<b.sal);

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you drop a trigger?

924


How can you create an empty table from an existing table?

1012


What is the difference between an inner and outer join?

963


What are analytical functions in sql?

972


Is pl sql different from sql?

938


What are the possible values for the boolean data field?

902


What is procedure in pl sql?

980


Do stored procedures prevent sql injection?

920


what is “go” in t-sql? : Transact sql

1045


What is asqueryable?

905


Is it possible for a table to have more than one foreign key?

979


How do you know if a relationship is 2nf?

877


What are the subsets of sql?

1038


What is synchronized subquery?

1093


What is set serveroutput on in pl sql?

1199