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.
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!