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
Introduction: When using MySQL to create a table,...
Table of contents Preface Actual Combat 1. No loc...
Preface: The "Getting Started with MySQL&quo...
There is currently a requirement that an operatio...
AI image cutting needs to be coordinated with PS....
The “Cancel” button is not part of the necessary ...
Text carousels are very common in our daily life....
Recently, I came across a webpage that had images ...
You may have set a MySQL password just now, but f...
After the official release of Activiti7, it has f...
Docker-compose deploys gitlab 1. Install Docker I...
This article example shares the specific implemen...
Written in front I don’t know who first discovere...
Table of contents 1. What is dynamic typing? 2. D...
A WeakMap object is a collection of key/value pai...