Reply to Re: How to display the managers and the employees working under that Manager
Posted by Ed Murphy on 09/08/06 05:09
broken arrow wrote:
> i have a table emp with employee id,name and mgrid
>
> I need to display the managers and the employee working under that
> manager . How should this be done.
Assuming you want the names of both, but don't care about IDs:
select m.name, e.name
from emp m
join emp e on e.mgrid = m.employee_id
order by m.name