This article describe how to get data from more than one table, using the MySQL joins.
SQL Join clause can be use when fetch data from two or more tables from the database. It’s depend on certain columns from two tables.
I am going to discuss seven different ways you can return data from two relational tables. I will be excluding cross Joins and self referencing Joins. The seven Joins I will discuss are shown below:
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- OUTER JOIN
- LEFT JOIN EXCLUDING INNER JOIN
- RIGHT JOIN EXCLUDING INNER JOIN
- OUTER JOIN EXCLUDING INNER JOIN
Let’s look into following examples for understand SQL joins.