连续 两个 LEFT JOIN LEFT JOIN

 http://forums.devshed.com/mysql-help-4/how-to-avoid-using-inefficient-in-not-in-in-a-568063.html

With appropriate indexes, this should be quite efficient enough:

SELECT tb3.employee_name, (salary+bonus) remuneration
FROM tb3
LEFT JOIN tb1
ON tb1.employee_name = tb3.employee_name
LEFT JOIN tb2
ON tb2.employee_name = tb3.employee_name
;

你可能感兴趣的:(left join)