SQL INNER JOIN Keyword
SQL INNER JOIN Keyword
The INNER JOIN keyword selects records that have matching values in both tables.
INNER JOIN Syntax
SELECT column_name(s)
FROM table1
INNER JOIN table2 ON
table1.column_name = table2.column_name

Demo Database
In this tutorial we will use the well-known Northwind sample database.
Below is a selection from the "Orders" table:

And a selection from the "Customers" table:

SQL INNER JOIN Example
The following SQL statement selects all orders with customer information:
SELECT Orders.OrderID, Customers.CustomerName
FROM Orders
INNER JOIN Customers ON Orders.CustomerID =
Customers.CustomerID;
Last updated
Was this helpful?