A JOIN is utilized for aggregating or combining data from two or more tables.
In MySQL, there are four different JOIN types:
- INNER JOIN – This type of JOIN simply outputs only the rows that get matched in both tables.
- LEFT JOIN – It returns all rows from the left table together with any matching rows from the right table.
- RIGHT JOIN – It returns all rows from the right table together with any matching rows from the left table.
- FULL OUTER JOIN – It is utilized for getting all rows or records from both tables.