标签: mysql
How to display those employees who are working in the same dept where his manager in the below table:
?
答案 0 :(得分:1)
使用self join即可。
self join
select e1.* from emp e1 inner join emp e2 on e1.mgr = e2.eno where e1.dept_no = e2.dept_no