左、右和完全外连接之间的区别

左、右和完全外连接之间的区别

In this post, we will understand the difference between left outer join, right outer join, and full outer join.

Left Outer Join

It fetches all the rows from the table on the left.

It is same as ‘Inner Join + all the unmatched rows from the left table’.

The data that isn’t matched on the right table is lost.

Example:

SELECT [column_1, column_2, ….] FROM table_1 LEFT OUTER JOIN table_2 ON table_1.matching_column = table_2.matching_column登录后复制