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 ways tablespaces can be managed and how do they differ?
What are the oracle built-in data types?
What is a connect identifier?
1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE
Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?
What is the difference between substr and instr?
What is an oracle tablespace?
How to get a list of all background sessions in the database?
How can I combine multiple rows into a comma-delimited list in oracle?
What is the difference between alert log file and tarce file ?
How can I create database in oracle?
How to start an oracle instance?
What is the exact use of Collections?
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE
Why packages are used in oracle?