Table of Contents
MySQL Left Join:
MySQL Left Join clause allows you to select rows from both left and right tables that are matched, plus all rows from the left table even with no matching rows found in the right table.
MySQL Right Join:
MySQL Right Join is simply the counterpart to the left join and works the same as the Left Join, except that all values are retrieved from the table on the right.
MySQL Left Join Syntax:
SELECT column_name (s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name; |
MySQL Right Join Syntax:
SELECT column_name (s) FROM table1 RIGHT JOIN table2 ON table1.column_name = table2.column_name; |
MySQL Left Join and Right Join:
Sample Table:


MySQL Left Join on Sample Table:

MySQL Right Join on Sample Table:

Comments (No)