Example a, b table:
bId | bNum |
1 | 20 |
2 | 30 |
aId | aNum |
1 | 10 |
2 | 20 |
3 | 30 |
left join is subject to the left table
select * from a left join b on a.aId=b.bId;
aId | aNum | bId | bNum |
1 | 10 | 1 | 20 |
2 | 20 | 2 | 30 |
3 | 30 | NULL | NULL |
Inner join selects both tables, which are equal one by one
aId | aNum | bId | bNum |
1 | 10 | 1 | 20 |
2 | 20 | 2 | 30 |