The JOIN Picture
Its easy to visualize both the LEFT and RIGHT joins.
<LEFT TABLE> [ JOIN ] <RIGHT TABLE>
Now depending on the JOIN we get either everything from left or right table.
- LEFT JOIN gives everything from left table and only matching values from right table:
<LEFT TABLE> [ LEFT JOIN ] <RIGHT TABLE>
^ ^
| |
| |
Get everything Get only matching
from here. values from here.
- RIGHT JOIN gives everything from right table and only matching values from left table:
<LEFT TABLE> [ RIGHT JOIN ] <RIGHT TABLE>
^ ^
| |
| |
Get only matching Get everything
values from here. from here.
That's the Idea ! 💡
Follow Full Join to continue from here.
Browse Full SQL Page.