Let's give a simple example. The results are more specific.
Table
Name sex
Michael Zhang
4 female Li
Table B
Name age
Li Si 30
Wang Wu 23
1 \ All external connections
Select a. Name, A. Sex, B. Name, B. Age
From a full outer join B on A. Name = B. Name
The result is as follows,
Name sex name age
John's male is null
Li Si female Li Si 30
Null null Wang Wu 23
Name of the joined field, which exists in the left table but not in the right table, for example, John and B. name, B. the age values are null, and the left and right sides are the result of the left join. The right table does not exist in the left table, for example, Wang Wu,. name,. the sex is null, and both sides are the result of the right connection; both sides are, for example, Li Si, which is the internal connection. See the following
2 \ left
Select a. Name, A. Sex, B. Name, B. Age
From a left Outer Join B on A. Name = B. Name
The result is as follows:
Name sex name age
John's male is null
Li Si female Li Si 30
2 \ Right
Select a. Name, A. Sex, B. Name, B. Age
From a right Outer Join B on A. Name = B. Name
The result is as follows:
Name sex name age
Li Si female Li Si 30
Null null Wang Wu 23
3 \ inline
Select a. Name, A. Sex, B. Name, B. Age
From a inner join B on A. Name = B. Name
The result is as follows:
Name sex name age
Li Si female Li Si 30
4 \ crossover
Select a. Name, A. Sex, B. Name, B. Age
From a cross join B on A. Name = B. Name
The result is as follows:
Name sex name age
Zhang San male, Li Si 30
Li Si female Wang Wu 23
Zhang San male Wang Wu 23
Li Si female Li Si 30