The connections in SQL statements include external connections, internal connections, and full connections.
Internal Connection:
The connection result contains only rows that meet the connection conditions. Both tables involved in the connection must meet the connection conditions.
The connection result contains not only the rows that meet the connection conditions, but also the rows that do not meet the conditions. Including left outer connection, right outer connection, and full outer connection.
Left Outer Join:
All data rows in the left table are retained, and rows in the right table that meet the connection conditions are retained.
The left join keyword returns all rows from the LEFT table (table_name1), even if no matching row exists in the right table (table_name2.
Outer right connection:
All data rows in the right table are retained, while rows in the left table that meet the connection conditions are retained.
The right join keyword returns all rows from the RIGHT table (table_name2), even if no matching row exists in the left table (table_name1.
All external connections:
Left outer join union right Outer Join
Right outer join or right join
Right join or right outer join.
The right outer join is the reverse join of the left Outer Join. All rows in the right table are returned. If a row in the right table does not match a row in the left table, a null value is returned for the left table.
All external connectionsFull outer join or full join
INNER JOIN
The inner join must both meet the conditions.