Answered Questions

  • Database Connectivity Error

    Here i'm sending all of you the error which occurred frequently during database connection.While creating a data block in Oracle Forms, the error which encountered frequently is "ORA-12560: TNS Protocol Adapter Error" During lectures instructor had told us that if such error encountered then copy the TNSNAMES.ORA file from ..oracleora92networkadminsample to forms9inetworkadminsample as it contains...

  • find manager for employee

    ID employee department manager----------------------------------------------1 Suresh c++ NULL 2 Suresh c++ NUll3 Suresh c++ 25 Sarathy testing 26 Rajaraman c# 17 joe Flash 1I have the employee detail table ,In that i want to find the manager for each employee .The employee...

    Star Read Best Answer

    Editorial / Best Answer

    mktiwary  

    • Member Since Jun-2008 | Jun 6th, 2008


    If you take the normal Oracle Employee (emp) table which consists of columns such as Employee Number (EMPNO) and Manager Number (MGR) then the query to find managers for all the employee is:

    select e.ename as Employee, m.ename as Manager from emp e, emp m
    where e.MGR = m.EMPNO