Beginner

531. EQUI JOIN

Understand EQUI JOIN and how equality conditions are used to match records between tables.

📘 Lesson 531 of 728 ⏱ 10 min 🎯 Intermediate

An EQUI JOIN is a JOIN that matches rows from two or more tables using the equality operator (=). It is one of the most common forms of relational JOIN.

Most everyday SQL JOINs use equality conditions to connect records through primary and foreign keys.

Match each order with the customer whose CustomerID is equal to the CustomerID stored in the order.

SQL
SELECT
    c.CustomerName,
    o.OrderID
FROM Customers c
INNER JOIN Orders o
    ON c.CustomerID = o.CustomerID;

Common in customer, sales, employee, account, product, and transaction reporting.

  • EQUI JOIN uses the equality operator.
  • It commonly connects primary and foreign keys.
  • INNER JOIN is frequently used for EQUI JOIN logic.
  • It is one of the most common JOIN patterns.
  • Matching data types should be considered.
What is an EQUI JOIN?

An EQUI JOIN matches rows using an equality condition between columns.

Where is EQUI JOIN commonly used?

It is commonly used to connect related tables through primary and foreign key columns.

Have you finished this lesson?

Introduction to SQL – All Lessons