An equi-join is a join based on equality
or matching column values. This equality is indicated with an equal
sign (=) as the comparison operator in the WHERE clause, as the following
query shows.
The query joins the manufact and stock tables
on the manu_code column. It retrieves only those rows for which
the values of the two columns are equal, some of which the result
shows.
In this equi-join, the result includes the manu_code column
from both the manufact and stock tables because the
select list requested every column.
You can also create an equi-join
with additional constraints, where the comparison condition is based
on the inequality of values in the joined columns. These joins use
a relational operator in addition to the equal sign (=) in the comparison
condition that is specified in the WHERE clause.
To join tables that contain columns with the same name,
qualify each column name with the name of its table and a period symbol
(.), as the following query shows.
The query joins the customer_num column
and then selects only those rows where the call_dtime in the cust_calls table
is greater than or equal to the ship_date in the orders table.
The result shows the combined rows that it returns.