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 / karthik ramasamy

Select max(salary) from salarymaster where salary <(select
max(salary) from salarymaster)

OR

SELECT MAX(SALARY) FROM SALARYMASTER WHERE SALARY NOT IN
(SELECT MAX(SALARY) FROM SALARYMASTER)

OR

Select max(salary) from salarymaster where salary<(Select
max(salary) from salarymaster)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you optimize a query?

938


How do I trace sql profiler?

919


what is innodb? : Sql dba

1030


What is sql*plus?

1016


What are the different sql languages?

984


What is the difference between between and in condition operators?

939


Can we create a trigger on view?

840


Is sql a oracle?

911


How do I start pl sql?

893


What is foreign key in sql with example?

889


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2411


The select into statement is most often used to create backup copies of tables or for archiving records?

1000


What are two statement types in sql?

1029


What is the use of count (*) in sql?

977


Can we join tables without foreign key?

907