INNER JOIN (INNER join) (a typical join operation, using a comparison operator like = or <>). Includes both equal and natural connections. Inner joins use comparison operators to match rows in two tables based on the values of the columns that are common to each table
Left join (left JOIN or left OUTER join) is the data in the table on the right-hand side is the datum, if the left table has data in the right table, otherwise the data in the right table showing the data in the table is empty
The right join is based on the data in the right table, and if the right table has data on the left table without data, the data in the left table of the data in the right table is displayed as empty.
Full joins (full join or fully OUTER join) complete external joins return all rows from the left and right tables. When a row does not have a matching row in another table, the selection list column for the other table contains a null value. If there are matching rows between the tables, the entire result set row contains the data values of the base table.
Here are a few examples to explain in detail
Two tables:
A (Id,name)
Data: (1, Zhang San) (2, John Doe) (3, Harry)
B (Id,name)
Data: (1, student) (2, teacher) (4, principal)
Internal connection results:
Select a.*,b.* from A inner join B on a.id=b.id;
1 31 students
2 Li 42 Teacher
Left JOIN Connection results:
Select a.*,b.* from A left join B on A.id=b.id;
1 31 students
2 Li 42 Teacher
3 Harry NULL NULL
Right Join Result:
Select a.*,b.* from A right join B on a.id=b.id;
1 31 students
2 Li 42 Teacher
Null NULL 4 Principal
MySQL internal connection, left join, right connection