An SQL
inner join combines matching rows between two tables. You can perform
an inner join on tables using two methods:
-
Specify the two tables to be joined
in a FROM clause separated by the INNER JOIN keyword. Next, specify
an ON clause that indicates how rows should be matched.
-
Join the two tables based on the
matching criteria, known as join conditions,
that you specify in a WHERE clause.
The following diagram
illustrates an inner join of two tables. The shaded area of overlap
represents the matching rows (the subset of rows) that the inner join
returns as output.
Note: An inner
join is sometimes called a conventional join