Home > Database > Mysql Tutorial > What does left join mean?

What does left join mean?

王林
Release: 2020-06-28 13:59:18
Original
19158 people have browsed it

The left join keyword returns all rows from the left table, even if there is no match in the right table. If there is no match in the right table, the result is NULL. The specific syntax is: [select column from t1 left join t2 on t1.column=t2.column].

What does left join mean?

left join keyword

(recommended learning: mysql tutorial)

The LEFT JOIN keyword returns all rows from the left table (table1) even if there is no match in the right table (table2). If there is no match in the right table, the result is NULL.

LEFT JOIN keyword syntax

SELECT column_name(s) FROM table_name1 
LEFT JOIN table_name2 
ON 
table_name1.column_name=table_name2.column_name
Copy after login

Note: In some databases, LEFT JOIN is called LEFT OUTER JOIN.

Let’s look at a picture:

What does left join mean?

Note: The LEFT JOIN keyword returns all rows from the left table, even if the right table (access_log ) does not match.

The above is the detailed content of What does left join mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template