
A Visual Explanation of SQL Joins
An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.
The most common type of join is SQL INNER JOIN (simple join). An SQL INNER JOIN return all rows from multiple tables where the join condition is met.
Assume we have the following two tables. Table A is on the left, and Table B is on the right. We'll populate them with four records each.
id...