Creating Equi-Joins

An equi-join links two tables on common values in a column in table 1 with a column in table 2. The restriction conforms to the following syntax:

 

Table1.column_a = Table2.column_a

 

In a normalized database the columns used in an equi-join are usually the primary key from one table and the foreign key in the other. For information on keys, see the section Joining Primary and Foreign Keys. When you create a new join, it is an equi-join by default. Most joins in your schema should be equi-joins.

Example: Equi-join Restricts Data

When a Select statement is run in the example below, the Select and From clauses create a Cartesian product. However, before any data is returned, the Where clause applies a restriction so that only rows where there is a match between the Country ID column in both the tables are returned.
Equi-joinRestrictsData.jpg