select de.dept_no
 ,s.emp_no
 ,s.salary
 from dept_emp de
 ,salaries s
 where de.emp_no=s.emp_no 
 and de.to_date='9999-01-01'
 and s.to_date='9999-01-01'
 and de.emp_no not in(select emp_no
                        from dept_manager)

where连接两个表!!且查找其他条件