1. 程式人生 > >MySQL資料庫多表聯合查詢

MySQL資料庫多表聯合查詢

select info.* from depart as d LEFT JOIN info_sys as info on d.id = info.dept_name 
left join grade g on info.id = g.sysinfo_id 
left join matarial m on g.id = m.grade_id
where d.detail_address='詳細地址' or g.name='';