branch_id branch_name
1 Branch A
2 Branch B
user_id username branch_id
1 abc 1
2 def 1
3 ghi 2
4 jkl 1
5 lmn 2
6 opq 2
クエリ1
query1="select a.branch_id,b.branch_id,a.branch_name from branch a LEFT JOIN user_mast b on a.branch_id=b.branch_id";
クエリ2
$query2="select a.branch_id,b.branch_id,a.branch_name from branch a INNER JOIN user_mast b on a.branch_id=b.branch_id";
LEFTJOINとINNERJOINの結果が同じである理由。