MySQL join queries are roughly divided into four types. The following describes these four types of MySQL join queries. If you are interested in this, take a look.
MySQL join queries are roughly divided into the following four types:
1. Inner join: the records that match the joined fields in the two tables form a join of the record set.
2. Outer Join: outer left join and outer right join.
Table A and table B on the left join means to link all the records in Table A and the joined fields in Table B with those records in Table A that meet the join conditions., note that the final record Assembly includes all records of Table.
The result of right join A and B is the same as that of left join B and A, that is:
Select A. name B. name From A Left Join B On A. id = B. id
The result is the same as that of Select A. name B. name From B Right Join A on B. id = A. id.
3. full join: retrieve all records of fields with a join relationship between the two tables to form a join of the record set. This does not need to be remembered, as long as the fields in the table mentioned in the query are all taken out, whether or not the join conditions are met, it is of little significance ).
4. No join: You don't need to explain it, that is, you don't have to use the join function, and you also have to say that you are not using the auto join function.
Here is a simple memory method. The difference between the inner and the inner join is that the inner join removes all non-conforming records, while the outer join retains some of them. The difference between outer left join and outer right join is that if A joins B on the left, all records in A are retained in the result. In this case, only records meeting the join condition in B are retained, on the contrary, the right join will not be confused.
MySQL sorting usage
Mysql multi-Table query implementation
How to deal with MySQL function creation Problems
Rational configuration of MySQL Open_Table
Optimization instance for MySQL random Query