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
What are the different types of record groups in oracle? Explain each of them
How to create a new tablespace in oracle?
We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.
What are the uses of Database Trigger ?
How view is different from a table?
Can you tell me how to add new column in existing views?how?How is possible?
How to create a temporary table in oracle?
What is enter substitution variable in oracle?
How to insert a record into a table?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
What is the difference between postgresql and oracle?
What to do if the binary spfile is wrong for the default instance?
For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?
What is a nested table?
How to set a transaction to be read only in oracle?