SELECT A.id,A.fz_id,A.jg_dept_id,A.jg_dept_name,A.jg_dept_code,
IFNULL(B.config01,0) As config01,IFNULL(B.config02,0) As config02,IFNULL(B.config03,‘‘) As config03
FROM A
LEFT JOIN B On A.jg_dept_code = B.bm_code
WHERE A.data_state = 1 AND A.fz_id = 12
原文:https://www.cnblogs.com/linhan8888/p/15226932.html