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

select top(1) a.name
from

(
select top(2) name,salary
from
employee
order by salary desc
)a
order by a.salary asc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data types in sql?

951


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

971


How does postgresql compare to mysql?

989


What are dml commands?

943


What are the advantages of pl sql?

1074


what are the types of subquery? : Sql dba

1053


Which nosql database is best?

929


what is sql? : Sql dba

973


what is sql profiler? : Sql dba

997


What is pl/sql language case sensitive?

1061


how to present a past time in hours, minutes and seconds? : Sql dba

946


Which join is default?

898


How do I view a procedure in sql?

913


What is scope and visibility in PL/SQL?

1116


What is anonymous block in sql?

1076