Đây là những gì LEFT JOIN dùng cho:
SELECT bug_id, `desc`, dev.assigned_to, qa.qa_contact
FROM bugs
INNER JOIN profiles as dev ON bugs.assigned_to = dev.userid
LEFT OUTER JOIN profiles as qa ON bugs.qa_contact = qa.userid
Đây là những gì LEFT JOIN dùng cho:
SELECT bug_id, `desc`, dev.assigned_to, qa.qa_contact
FROM bugs
INNER JOIN profiles as dev ON bugs.assigned_to = dev.userid
LEFT OUTER JOIN profiles as qa ON bugs.qa_contact = qa.userid