<Mysql> mysql based learning

1, Join Syntax

JOIN divided into the following three types according to the function:

INNER JOIN (the connection, or equivalent connection): access to records matching relationship exists connecting two tables.

LEFT JOIN (left connection): Get the left table (table1) completely recorded, that is, the right table (Table2) does not match the corresponding record.

RIGHT JOIN (right connection): In contrast to the LEFT JOIN, obtain the right table (Table2) completely recorded, that is, the left table (table1) does not match the corresponding record.

1.1、Inner join

The connector, also known as equivalent connection, inner join to produce a set of data at the same time meet the A and B.

1.2、Left join

Left connecting the left table (A) to produce a complete record with the matching records (right table (B)). If there is no match, the right side will contain null.

 

1.3, Right join (left join with)

Guess you like

Origin www.cnblogs.com/shuimohei/p/11595901.html