In this tutorial, we will learn MySQL Joins. We can combine data from multiple tables, using the MySQL JOIN keyword. A join operation produces result by combining or joining information in one table with information in another table.
The main categories of joins are as follows:
- Cross Join
- Inner Join
- Outer Join
The basic join syntax is shown below:
SELECT table1.column, table2.column, ..
FROM table1 JOIN table2
Cross Join is also called a Cartesian Product. Cross Join yields all possible combinations of rows. The Cross Join combines all the rows from one table with all the rows of another table
When the tables are cross-joined, each row from one table is combined with each row from every other participating table.
For example, if Table A has 5 rows and Table B has 10 rows. The Cartesian Product of the two tables will yield
= 5 * 10 = 50 rows
An INNER JOIN identifies matching rows from the joined tables.
An INNER JOIN finds matching rows from the joined tables. OUTER JOIN will also finds instances of rows in one table that has no match in another table in the join.
MySQL Tutorials on this website:
For more information on MySQL Database: