itsm_xhrs.tbl_itsm_incident_info,tbl_itsm_incident_process,itsm_xhrs.tbl_system_user_info将这三个表用left join关联起来
时间: 2023-05-23 19:02:31 浏览: 107
Sql语句用left join解决多表关联问题(关联套关联,例子和源码)
3星 · 编辑精心推荐
可以使用以下SQL语句进行left join关联:
SELECT * FROM itsm_xhrs.tbl_itsm_incident_info
LEFT JOIN tbl_itsm_incident_process ON itsm_xhrs.tbl_itsm_incident_info.id = tbl_itsm_incident_process.incident_id
LEFT JOIN itsm_xhrs.tbl_system_user_info ON tbl_itsm_incident_process.assigned_user_id = itsm_xhrs.tbl_system_user_info.id;
这样就可以关联起这三个表了。
阅读全文