获取所有员工当前的manager-SQL题解
获取所有员工当前的manager
http://www.nowcoder.com/questionTerminal/e50d92b8673a440ebdf3a517b5b37d62
select de.emp_no,dm.emp_no as manager_no from dept_emp as de
join dept_manager as dm
on de.to_date='9999-01-01'
and de.to_date=dm.to_date
and de.dept_no = dm.dept_no
where de.emp_no != manager_no;