Home  >  Article  >  Database  >  What does right join mean?

What does right join mean?

王林
王林Original
2020-06-28 13:46:347371browse

right join is a query type in sql language, that is, connection query, the full name is right outer join, which is a kind of outer join. The right join keyword returns all rows from the right table, even if there are no matches in the left table. If there is no match in the left table, the result is NULL.

What does right join mean?

right join is a query type in the SQL language, that is, a join query. Its full name is right outer join (right outer join), which is a type of outer join. kind.

(Recommended tutorial: mysql tutorial)

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

SQL RIGHT JOIN syntax is as follows:

SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name=table2.column_name;

or

SELECT column_name(s)
FROM table1
RIGHT OUTER JOIN table2
ON table1.column_name=table2.column_name;

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

Statement:
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