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
Table of contents 1. The elephant that can’t fit ...
This article mainly introduces common strategies ...
SVN is the abbreviation of subversion, an open so...
GNU Parallel is a shell tool for executing comput...
IE8 new feature Web Slices (Web Slices) Microsoft...
This article mainly introduces how to build a MyS...
I slept late yesterday and was awake the whole da...
Table of contents Prototype chain diagram Essenti...
Table of contents Question: When the button is cl...
yum quick install mysql Add yum repository rpm -U...
Table of contents 1. New usage of watch 1.1. Watc...
Original derivative command: bin/sqoop import -co...
Overview This article begins to introduce content...
It is essentially a common js object used to desc...
Recently, there is a requirement for uploading pi...