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

How to get second highest salary from a table

Answer Posted / srinivas

select * from emp m where(select count(distinct sal)+1 from emp s where s.sal>m.sal)=2

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What schema means?

877


What is sql catalog?

1000


How to add a column ‘salary’ to a table employee_details?

994


How do you drop a trigger?

967


What is a join query?

939


How many triggers can be applied on a table?

923


What is a common use of group by in sql?

1030


what are date and time intervals? : Sql dba

1034


How do I make my sql query run faster?

919


What is the difference between nested table and varray?

993


What is a scalar value in sql?

1054


How many indexes can be created on a table in sql?

1036


Is it possible to link two groups inside a cross products after the cross products group has been created?

993


What is data definition language?

1081


Is id a reserved word in sql?

1134