如:即不在A表user里面;也不在B表department里面的数据;条件 is null
selectt.id userid,t.name, t.department_id, d.departmentfrom t_users tleftjoint_department dond.id= t.department_idwhered.idisnullUNIONselectt.id userid,t.name, t.department_id, d.departmentfrom t_users trightjoint_department dond.id= t.department_idwheret.department_idisnull