题解 | #获取所有员工当前的manager#
获取所有员工当前的manager
http://www.nowcoder.com/practice/e50d92b8673a440ebdf3a517b5b37d62
select e.emp_no, m.emp_no as manager from dept_emp as e inner join dept_manager as m on e.dept_no = m.dept_no where e.emp_no not in ( select emp_no from dept_manager ) and m.to_date = '9999-01-01';
注意to_date = '9999-01-01'; 代表的是正在在职的员工