select sr.emp_no, sr.salary , sr.from_date,sr.to_date, dm.dept_no from salaries sr right join dept_manager dm on sr.emp_no=dm.emp_no order by emp_no

看了题解,不明白为什么要对to_date做条件?

select s.*,d.dept_no

from salaries as s inner join dept_manager as d

on s.emp_no=d.emp_no

where s.to_date='9999-01-01' and d.to_date='9999-01-01'

这是为什么