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...

how to find the second highest salary from emp table?

Answer Posted / subash pandey

SELECT salary
FROM employee e
WHERE n = (
SELECT count( * )
FROM employee
WHERE salary > e.salary )

n=1 or 2 or 3 n is level which level max salary you want
i test this it proper work

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mdf ldf and ndf?

1057


What are the various restrictions imposed on view in terms of dml?

1017


What is union and union all keyword in sql and what are their differences?

1157


How many types of privileges are available in sql?

1401


What is sql in java?

1134


What are three advantages to using sql?

1069


Does sqlite need a server?

1097


What does t sql mean?

1000


what are date and time intervals? : Sql dba

1102


how many triggers are allowed in mysql table? : Sql dba

1102


What is the difference between instead of trigger and after trigger?

1066


What is the difference between cluster and non-cluster index?

1157


How do you change a value in sql?

1064


What is difference between function and trigger?

1109


What is the process of debugging?

1125