Inscription
This article will share the understanding of all connection queries in mysql and the writing of sql (the foreign key is not set in the database)
Connect query
Internal connection
The inner join is to query the common part of the two tables, which is equivalent to the'and' operation. The sql statement is as shown in the figure below, the text version is not given, you can write it by yourself.
search result
Left outer join
search result:
search result
Right outer join
Query result
Query result
Fully connected
The full connection of mysql is executed through the left and right outer join queries of union
Query result
Query result