Let's give a general explanation.
Example Table
Aid adate
1 A1
2 A2
3 A3
Table B
Bid bdate
1 B1
2 B2
4 B4
Two tables A and B are connected. fields with the same ID must be retrieved.
Select * from a inner join B on A. Aid = B. Bid this is only used to retrieve matching data.
In this case, the following information is taken:
1 A1 B1
2 A2 B2
Then left join refers:
Select * from a left join B on A. Aid = B. Bid
First, retrieve all the data in Table A, and then add the data that matches table A and table B.
In this case, the following information is taken:
1 A1 B1
2 A2 B2
3 A3 null characters
Right join is also available.
This means that all data in Table B is retrieved first, and then the data matching A and B is added.
In this case, the following information is taken:
1 A1 B1
2 A2 B2
4 blank characters B4
Left join or left Outer Join.
The result set of the left Outer Join includes all rows in the left table specified in the left outer clause, not just the rows matched by the join column. If a row in the left table does not match a row in the right table, all selection list columns in the right table in the row of the associated result set are null.