In MySQL, joins are used to query data from two or more tables. The query is made using the relationship between certain columns existing in the table.
There are four types of joins in MySQL.
- Inner join returns rows if there is at least one match in both tables.
- Left join returns all the rows from the left table even if there is no match in the right table.
- Right join returns all the rows from the right table even if no matches exist in the left table.
- Full join would return rows when there is at least one match in the tables.