JOIN IN SQL STEMENT A JOIN clause is used to combin

Опубликовано: 11 Июль 2026
на канале: Nisaru Technology
7
2

A JOIN clause is used to combine rows from two or more tables, based on a related column between them.
Let's look at a selection from the "Orders" table
MySQL Joins.
What is a join function in SQL?
A join is used to combine rows from two or more tables, based on a related column between them.
Let's look at a selection from the "Orders" table which has 3 columns: Order Id, Customer ID and Order Date.
Then, look at a selection from the "Customers" table.
This table has more information on Customers like Customer number, Customer name, Contact name and Country.
Notice that the CustomerID column in the "Orders" table refers to the "CustomerID" in the "Customers" table.
The relationship between the two tables above is the "CustomerID" column.
Then, we can create a SQL statement that contains an INNER JOIN. This statement will selects records that have matching values in both tables.
The result of this SQL statement will produce something like this :