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

Is left join same as join?

999


how can you create an empty table from an existing table? : Sql dba

1156


What is a table in a database?

1048


Can we rollback after truncate?

1033


how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

1193


Explain normalization and what are the advantages of it?

953


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

1003


How do you declare a variable in pl sql?

1032


Is time a data type in sql?

911


How to fix oracle error ora-00942: table or view does not exist

1016


How do I count rows in sql query?

996


What are the different types of constraints?

1188


What is embedded sql what are its advantages?

1044


What are inbuilt functions in sql?

1066


What are the types of views in sql?

1103