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
How to define a variable to match a table column data type?
Design database draw er diagram for a certain scenario ?
How to test null values?
How can Oracle users be audited?
How to create a table index in oracle?
What is meant by a deadlock situation?
WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?
How do I know if oracle client is installed on windows?
How do I spool to a csv formatted file using sqlplus?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
What suggestions do you have to reduce the network traffic?
How to check the server version in oracle?
How to find the duplicate rows count from employees table in oracle?
Can we create trigger on materialized view in oracle?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.