题目描述不准备,但是猜测是这个意思
select a.emp_no,b.salary,b.from_date,b.to_date,a.dept_no from dept_manager a, salaries b where a.emp_no=b.emp_no
and a.to_date='9999-01-01' and b.to_date='9999-01-01'
order by b.emp_no