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

You have one employee table having 3 entries emp_id, Mgr_id
and salary. Mgr_id is also referencing emp_id. so now find
out the emp_id which are having the second highest salary,
under a particular manager.

Answer Posted / kumar mrityunjay singh

SELECT *
FROM (SELECT EMPLOYEE_ID,MANAGER_ID,SALARY,DENSE_RANK() OVER(ORDER BY SALARY DESC)RN FROM EMPLOYEES WHERE MANAGER_ID='&ENTER_MANAGER_ID')WHERE RN < '&VALUE_UPTO'
/

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I learn what codesets are available in oracle?

1080


Is there a function to split a string in plsql?

1109


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

2002


What happens if you set the sga too low in oracle?

1227


What privilege is needed for a user to insert rows to tables in another schema?

1064


src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));

1750


I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?

2505


What do you mean by group by clause?

1094


What is merge statement used for?

1077


List the types of joins used in writing subqueries?

1042


What is meant by an index?

1225


How to convert dates to characters in oracle?

1096


Can we connect to ORACLE db using Windows Authentication?

1308


How to invoke the data pump export utility?

1257


How do we represent comments in oracle?

1100