Mysql join query 1. Basic concepts Connect each row of the two tables horizontally in pairs to obtain the results of all rows. Assumptions:
2. The result after they are connected is similar to this: 3. Basic form of join query: from table 1 [join method] join table 2 [on join condition] Basic form of join query: from table 1 [join method] join table 2 [on join condition] 1. Classification of connection queries Cross Connect In fact, it is the "all data" obtained after connecting two tables according to the basic concept of connection, without any "filtering" result - filtering refers to the connection condition. That is, a cross join is an unconditional "join all" - also known as a Cartesian product. Cross joins usually have no practical value because after joining the data, the meaning of each row of data may be "lost". form:
or:
Inner Join form:
meaning: Get the data of the rows that meet the set connection conditions (the conditions after on) in the result of a "cross connection"; Cross joins often have "meaningless data", as follows: 2. Look at the results of the inner connection: 3. The result is: 4. It can be seen that inner join is actually to find the "meaningful" data rows in the data results of a cross join. In a cross join, some of the data are meaningful, while some are meaningless (erroneous data). However, please note:
You may also be interested in:
|
<<: CentOS7 installation GUI interface and remote connection implementation
>>: JavaScript canvas to achieve raindrop effect
In this tutorial, we use the latest MySQL communi...
1. Insert the wireless network card and use the c...
Achieve results html <div class="containe...
Install the unzipped version of Mysql under win10...
See: https://www.jb51.net/article/112612.htm Chec...
Scenario simulation: The operation and maintenanc...
Negative distance refers to empathy. Preface (rai...
mysql copy one table column to another table Some...
First, let's talk about why we use provide/in...
During the front-end development process, a situat...
⑴ Content determines form. First enrich the conten...
Introduction When writing SQL today, I encountere...
step: 1. Create a new docker-compose.yml file in ...
Many friends found that the box model is a square...
Table of contents TypeScript environment construc...