连续 两个 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
;

posted on 2008-11-08 23:28  cy163  阅读(14312)  评论(0编辑  收藏  举报

导航