The difference between inner join and outer join: 1. The connection results are different. The connection result of the inner join only contains the rows that meet the connection conditions, while the connection result of the outer join contains the rows that meet the connection conditions; 2. The precautions are different. Inner joins need to pay attention to the difference between any and all used in nested queries. Outer joins do not need to be distinguished, and neither the left table nor the right table is restricted.
This article Environment: Windows7 system, Dell G3 computer.
The difference between inner join and outer join:
The difference between inner join and outer join in the database mainly lies in the different connection results and different precautions, as follows:
1. The connection result is different
The connection result of the inner connection only contains the rows that meet the connection conditions, and the two tables participating in the connection must meet the connection conditions; the connection result of the outer connection not only contains the rows that meet the conditions Rows with join conditions, and rows that do not meet their own conditions, including left outer joins, right outer joins, and full outer joins.
2. Different precautions
Inner joins need to pay attention to the difference between any and all used in nested queries; outer joins do not need to be distinguished, neither the left table nor the right table Restricted, all records are displayed, and null can be used to fill in the insufficient places of the two tables.
Inner connection Refers to the most common equivalent connection; left outer connection refers to the addition of unmatched data in the main table on the basis of the equivalent connection, and the right outer connection is the same; full outer connection refers to the equivalent connection On the basis of , the unmatched data in the left table and the right table are added together.