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 information schema in sql?

1070


What is normalization? How many normalization forms are there?

1085


What is sqlerrd?

968


Name three sql operations that perform a sort.

1013


What is a sql driver?

998


What steps server process has to take to execute an update statement?

975


What is clause in sql?

1109


What is percent sign in sql?

1283


Does mysql_real_escape_string prevent sql injection?

949


What does the sign mean in sql?

989


What is primary key sql?

1039


what is 'mysqladmin' in mysql? : Sql dba

1026


What does a pl/sql package consist of?

976


What is $$ in sql?

992


What is foreign key in sql with example?

936