方法)两表连结+子查询
SELECT de.dept_no, de.emp_no, s.salary FROM dept_emp AS de, salaries AS s WHERE de.emp_no = s.emp_no AND de.emp_no NOT IN( -- 子查询找出非manager的emp_no SELECT emp_no FROM dept_manager WHERE to_date = '9999-01-01') AND s.to_date = '9999-01-01';给了一堆表看起来很吓人,只需要连结两个加一个子查询就能搞定 = =