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

How to assign sql query results to pl sql variables?

995


What is the command used to fetch the first 5 characters of a string?

1152


How do I view output in sql developer?

1029


Give the order of sql select?

1089


Why plvtab is considered as the easiest way to access the pl/sql table?

1132


what are the types of join and explain each? : Sql dba

991


What is the difference between joins?

977


What are inner outer left and right joins in sql?

965


How do I create a memory optimized filegroup?

906


What is bitemporal narrowing?

1232


what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba

903


What is trigger in sql and its types?

992


What is the difference between sql and mysql?

1055


Is id a reserved word in sql?

1093


What are the types of queries in sql?

1017