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
Explain the use of rows option in imp command.
What is ASM (Automatic Storage Management) in Oracle?
How do we display rows from the table without duplicates?
How to create a new table by selecting rows from another table?
Does facebook use oracle?
How to change user password in oracle?
What is a system tablespace?
What is bulk load in oracle?
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?
What is an oracle transaction?
How to convert a date to char in oracle? Give one example.
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
How to count duplicated values in a column in oracle?
What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar
Can we use bind variables in oracle stored procedure?