1. 程式人生 > >連續 兩個 LEFT JOIN LEFT JOIN

連續 兩個 LEFT JOIN LEFT JOIN

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