方法)表联结,WHERE筛选条件当前
SELECT dm.dept_no, dm.emp_no, s.salary FROM dept_manager AS dm JOIN salaries AS s ON dm.emp_no = s.emp_no WHERE dm.to_date = '9999-01-01' AND s.to_date = '9999-01-01' ORDER BY dept_no ASC;注意题目要求的 输出结果按照dept_no升序排列
SELECT dm.dept_no, dm.emp_no, s.salary FROM dept_manager AS dm JOIN salaries AS s ON dm.emp_no = s.emp_no WHERE dm.to_date = '9999-01-01' AND s.to_date = '9999-01-01' ORDER BY dept_no ASC;注意题目要求的 输出结果按照dept_no升序排列