Here is an example analysis
Table A records the following:
AID Anum
1 a20050111
2 a20050112
3 a20050113
4 a20050114
5 a20050115
Table B records the following:
BID bname
1 2006032401
2 2006032402
3 2006032403
4 2006032404
8 2006032408
Create these two table SQL statements as follows:
CREATE TABLE A
AID Int (1) auto_increment PRIMARY KEY,
Anum Char (20)
)
CREATE TABLE B (
BID Int (1) not NULL auto_increment PRIMARY KEY,
Bname Char (20)
)
INSERT into a
VALUES (1, ' a20050111 '), (2, ' a20050112 '), (3, ' a20050113 '), (4, ' a20050114 '), (5, ' a20050115 ');
INSERT into B
VALUES (1, ' 2006032401 '), (2, ' 2006032402 '), (3, ' 2006032403 '), (4, ' 2006032404 '), (8, ' 2006032408 ');
The experiment is as follows:
1.left join (left join)
The SQL statements are as follows:
SELECT * from a
Left JOIN b
On A.aid =b.bid
The results are as follows:
AID Anum BID bname
1 a20050111 1 2006032401
2 a20050112 2 2006032402
3 a20050113 3 2006032403
4 a20050114 4 2006032404
5 a20050115 NULL NULL
(The number of rows affected is 5 rows)
Result Description:
The left join is based on the records of Table A, a can be regarded as the right table, and B can be regarded as left table.
In other words, the records of the left table (A) will all be represented, and the right table (B) will only display records that match the search criteria (in the example: A.aid = b.bid).
The low-record of table B is null.
2.right join (right join)
The SQL statements are as follows:
SELECT * from a
Right joing b
On a.aid = B.bid
The results are as follows:
AID Anum BID bname
1 a20050111 1 2006032401
2 a20050112 2 2006032402
3 a20050113 3 2006032403
4 a20050114 4 2006032404
NULL NULL 8 2006032408
(The number of rows affected is 5 rows)
Result Description:
Looking closely, you will find that the result of the left join is exactly the opposite, this time it is based on the right table (B), where a table is not enough to fill with null.
3.inner Join (equal join or inner join)
The SQL statements are as follows:
SELECT * from a
INNER JOIN b
On A.aid =b.bid
Equivalent to the following SQL sentence:
SELECT *
From a A B
WHERE A.aid = B.bid
The results are as follows:
AID Anum BID bname
1 a20050111 1 2006032401
2 a20050112 2 2006032402
3 a20050113 3 2006032403
4 a20050114 4 2006032404
Result Description:
Obviously, only a.aid = B.bid records are shown here. This shows that inner join is not based on who, it only shows records that match the criteria.
The left JOIN operation is used in any FROM clause, 
combines the records from the source table. Use the LEFT JOIN operation to create a left outer join. The left outer join will contain all records from the first (left) two tables, i.e.  
Causes records in the second (right) table to have no matching values.  
Syntax: from table1 left join table2 on table1.field1 compopr table2.field2
Description: The Table1, table2 parameter is used to specify the name of the table to combine records with.   the
field1, field2 parameter specifies the name of the field being joined. These fields must have the same data type and contain the same type of data, but they do not need to have the same  
name.  
COMPOPR parameter specifies the relational comparison operator: "=", "<", ">", "<=", ">=" or "<>". &NBSP;
if you want to join the Inner join data type or memo in a ole object operation The field of data type data, an error will occur.
MySQL left join,right join,inner join usage Analysis