What is the difference between INNER JOIN, LEFT JOIN, and RIGHT JOIN in MySQL?

1 Answers
Answered by suresh

Difference between INNER JOIN, LEFT JOIN, and RIGHT JOIN in MySQL

Difference between INNER JOIN, LEFT JOIN, and RIGHT JOIN in MySQL

INNER JOIN: Returns only the rows that have a match in both tables.

LEFT JOIN: Returns all the rows from the left table, and the matched rows from the right table. If there is no match, NULL values are returned from the right table.

RIGHT JOIN: Returns all the rows from the right table, and the matched rows from the left table. If there is no match, NULL values are returned from the left table.

Answer for Question: What is the difference between INNER JOIN, LEFT JOIN, and RIGHT JOIN in MySQL?