I really don't get this LEFT JOIN. Can someone explain this pretty easy?
Let's say I have 2 tables.
Table A: a_id, name, info
Table B: b_id, title, a_no
In table A I have everything complete and in table B I only have some people from Table A
that are linked (via a_no -> a_id).
Let's say in A I have:
1, james, a good friend
2, sean, likes coffee
3, linda, vegetarian
And in Table B I have:
1, teacher, 1
2, nurse, 3
As you can see all 3 friends in table a need to be listed and Sean (No 2) is not linked to Table B,
but I need him listed as well.
So, now I want a list of all my friends in Table A (even if they don't have been added to Table B).
I think the correct way is to use JOIN LEFT, but in what way?
Can someone explain this by using this easy example. Then I hope I will understand how it works.
![]()




Bookmarks