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 / chandra reddy
select empno,ename,deptno,sal from(select e.*,b.sal,rank()over(order by sal desc)send_h from em e join em1 b on e.empno=b.empno) where send_h=2
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?
How can I combine multiple rows into a comma-delimited list in oracle?
Explain constraining triggers.
Explain what does a control file contain?
How can I create database in oracle?
Explain the use of full option in exp command.
Explain the use of constraints option in exp command.
What's dateware house and what's clustor with practicle example
What are group functions in oracle?
Difference between varchar and varchar2 data types?
What are the varoius components of physical database structure of oracle database?
How to build data dictionary view an new database?
How to get execution statistics reports on query statements?
How to use attributes of the implicit cursor in oracle?
How to resolve the ORA-39133 error in Oracle?