> For the complete documentation index, see [llms.txt](https://gyansetu-sql.gitbook.io/sql-programming/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-sql.gitbook.io/sql-programming/sql-select/sql-joins/sql-inner-join-keyword.md).

# SQL INNER JOIN Keyword

### SQL INNER JOIN Keyword

The INNER JOIN keyword selects records that have matching values in both tables.

#### INNER JOIN Syntax

```sql
SELECT column_name(s)
FROM table1
INNER JOIN table2 ON 
table1.column_name = table2.column_name
```

![](https://826093633-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LS8lPNzCGPR5-DLbGXv%2F-LSTT_CvIQjTrG47saQ7%2F-LSTV68khh5fkv8DncAT%2Fimage.png?alt=media\&token=d16585e8-c2f7-4762-9481-ec68a11759db)

### Demo Database

In this tutorial we will use the well-known Northwind sample database.

Below is a selection from the "Orders" table:<br>

![](https://826093633-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LS8lPNzCGPR5-DLbGXv%2F-LSTT_CvIQjTrG47saQ7%2F-LSTVRDiJFKA32_uIYdc%2Fimage.png?alt=media\&token=c1f619e7-734c-44be-a7aa-823c8e7fede9)

\
&#x20;And a selection from the "Customers" table:

![](https://826093633-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LS8lPNzCGPR5-DLbGXv%2F-LSTT_CvIQjTrG47saQ7%2F-LSTVav0lwAiBTObXi33%2Fimage.png?alt=media\&token=6cd91f06-2d24-4a0f-a8c4-6a8a1cd23fde)

\
SQL INNER JOIN Example

The following SQL statement selects all orders with customer information:

```sql
SELECT Orders.OrderID, Customers.CustomerName
FROM Orders
INNER JOIN Customers ON Orders.CustomerID = 
Customers.CustomerID;
```

<br>
