MySQL Left Join and Right Join

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 student table
sample city table in mysql

MySQL Left Join on Sample Table:

MySQL Left Join Codeunit

MySQL Right Join on Sample Table:

MySQL Right Join Codeunit

MySQL Inner Join
MySQL Limit and Offset Clause
Characteristics of Computer
Secondary Storage Devices
Client-Server Architecture
Computer Network
MySQL– Wikipedia

Comments (No)

Leave a Reply