Focus:
Left join is to find out the table 1 (the most left-most table in the statement), even if Table 2 (the most right table in the statement) does not match (with null display)
The right connection is to find out the table 2 (the most right table in the statement), even if Table 21 (the most left-most table in the statement) does not match (with null display).
Do not change the position of table 1, 2, as long as the left to right to the line (the connection is changed to a correct connection). Here the 1, 2 is a relative concept, 1 on the left, 2 on the right.
It is recommended to use aliases to write statements so that the results are clearer, the program is recognizable, and the new table names are added directly to the original table name.
1, inner connection (Cartesian product n*m)
2. External connection
Including the left and right connections, the left link to the left side of the table information is listed, even if the right side of the table does not match (with a null match);
The right connection lists the information on the right side of the table, even if the table on the left does not match it (with a null match).
3, LEFT JOIN connect
4. Right Connection
The right connection using aliases is more refreshing and the program readability is even higher.
5. Multi-condition Connection
There are multiple criteria for querying:
MySQL connection query