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

Explain the use of rows option in imp command.

1087


What is ASM (Automatic Storage Management) in Oracle?

1197


How do we display rows from the table without duplicates?

973


How to create a new table by selecting rows from another table?

1102


Does facebook use oracle?

1034


How to change user password in oracle?

1029


What is a system tablespace?

1080


What is bulk load in oracle?

1070


Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?

1384


What is an oracle transaction?

1146


How to convert a date to char in oracle? Give one example.

1068


How can I convert single byte kana characters into multi byte kana characters and vice-versa.

2397


How to count duplicated values in a column in oracle?

1044


What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar

4595


Can we use bind variables in oracle stored procedure?

951