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

Explain select statements in sql?

1052


Is id a reserved word in sql?

1141


How to disable a trigger name update_salary?

1262


How do you use collections in procedure to return the resultset?

2236


which command using query analyzer will give you the version of sql server and operating system? : Sql dba

1053


What is the difference between drop and truncate commands?

1055


how to start mysql server? : Sql dba

1195


What is cursor in pl sql with examples?

1033


What are the triggers associated with image items?

1038


What are types of indexes in sql?

1072


What is a mutating table and a constraining table?

1102


What is the use of index in sql?

1011


Does truncate table reset auto increment?

988


What is a unique key?

1048


What is a join query?

951