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
What privilege is needed for a user to create tables in oracle?
How to start your 10g xe server from command line?
How do I limit the number of rows returned by an oracle query after ordering?
Why does oracle 9i treat an empty string as null?
Give syntax for SQL and ORACLE joins.
Can we create trigger on materialized view in oracle?
What do you understand by a database object? Can you list a few of them?
Explain how are indexes update?
Explain the use of log option in exp command.
How can windows applications connect to oracle servers?
What is the difference between alert log file and tarce file ?
What is transport network substrate (tns) in oracle?
what are steps for interface? where is exchange rate defined in which table?
How do I find the database name in oracle?
How will you differentiate between varchar & varchar2?