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

Hi,


Select * from emp e where 2>= (select count(sal) from
emp e where sal>=e.sal) order by desc.

Let me know if it is wrong..


Regards,
Satya.K

Is This Answer Correct ?    11 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different dcl commands in sql?

1069


What is int identity in sql?

1064


What is sql comments?

1038


What are dml commands?

943


what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba

903


What is rename command in sql?

953


What is dba in sql? : SQL DBA

999


explain primary keys and auto increment fields in mysql : sql dba

902


What is a trigger in sql?

1158


What is parallel hint?

1223


Why partition by is used in sql?

972


Can one improve the performance of sql*loader? : aql loader

983


Why functions are used in sql?

932


Where not exists in sql?

913


What is a trigger word?

964