SELECT s.*, dm.dept_no FROM salaries s INNER JOIN dept_manager dm ON s.emp_no=dm.emp_no ORDER BY s.emp_no;