左连接查询,以薪水信息表为主表,勿忘记on条件和体重规定的最后一列dept_no
SELECT s.*, d.dept_no FROM salaries s LEFT JOIN dept_manager d ON s.emp_no = d.emp_no WHERE s.to_date = '9999-01-01' AND d.to_date = '9999-01-01' ORDER BY s.emp_no
左连接查询,以薪水信息表为主表,勿忘记on条件和体重规定的最后一列dept_no
SELECT s.*, d.dept_no FROM salaries s LEFT JOIN dept_manager d ON s.emp_no = d.emp_no WHERE s.to_date = '9999-01-01' AND d.to_date = '9999-01-01' ORDER BY s.emp_no