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


Please Help Members By Posting Answers For Below Questions

Can you create a synonym without having a table?

543


How to assign data of the deleted row to variables?

577


How to connect the oracle server as sysdba?

623


how may join possible between (requisition with purchase order)

1695


Whether any commands are used for months calculation? If so, what are they?

584






What is difference between cartesian join and cross join?

582


What is a nvl function? How can it be used?

553


What is oracle data type?

548


How to set a transaction to be read only in oracle?

574


Explain the use of file option in exp command.

593


What is BBED in Oracle?

678


hey friends, What are the steps I can do to transfer the database from Microsoft Access 2003 to oracle10g (or SQL) Best regards

1560


How to create a temporary table in oracle?

683


Explain compound trigger in oracle?

542


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

1574