Equi Join: A join in which the joining condition is based on equality among values in the common columns. Common columns show (redundantly) in the result table. Let us Consider the following relations:
- Customer (custid, custname, ...........) and
- Order (custid, ordered,....................)
Example: What are the names of all customers who have placed orders?
The needed information is available in two tables, customer and order. The SQL solution needs joining the two tables by using equi join.
SELECT CUSTOMER.CUTOID, ORDER.CUSTOID, CUSTONAME, ORDERID
FROM CUSTOMER, ORDER
WHERE CUSTOMER.CUSTOID=ORDER.CUSTOID;
The output might be:
Customer.custoid
|
order.custoid
|
custoname
|
orderid
|
--------------------------
|
------------------
|
-----------------------
|
----------
|
10
|
10
|
Pooja Enterprises
|
1001
|
12
|
12
|
Estern Enterprises
|
1002
|
3
|
3
|
Impressions
|
1003
|