---
title: "How to Join Multiple Tables and Retrieve Specific Columns in SQL Server?"  
description: "How to Join Multiple Tables and Retrieve Specific Columns in SQL Server?"  
author: "Anubhav Sharma"  
published: 2024-07-15  
updated: 2024-07-16  
canonical: https://www.mindstick.com/forum/160909/how-to-join-multiple-tables-and-retrieve-specific-columns-in-sql-server  
category: "SQL Server"  
tags: ["database", "sql server", "sql server 2008", "sql server 2012", "sql server 2022"]  
reading_time: 2 minutes  

---

# How to Join Multiple Tables and Retrieve Specific Columns in SQL Server?

Hi everyone,

I have three tables: `Customers`, `Orders`, and `Products`. I need to join these tables and [retrieve](https://www.mindstick.com/forum/34400/how-to-retrieve-form-values-in-controller-action) [specific columns](https://www.mindstick.com/forum/159131/how-to-find-all-tables-in-oracle-that-have-specific-columns) like `CustomerName`, `OrderID`, `ProductName`, and `OrderDate`. Can [someone help me](https://answers.mindstick.com/qa/42311/can-someone-help-me-with-this-question-about-political-parties) with the correct [SQL query](https://www.mindstick.com/forum/529/rename-table-name-and-column-name-using-sql-query) for this?

## Replies

### Reply by Ravi Vishwakarma

To [**join multiple tables**](https://www.mindstick.com/blog/304465/difference-between-inner-join-left-join-right-join-and-full-outer-join-in-sql-server) and retrieve specific columns in SQL Server, you can use the `INNER JOIN` clause (or other types of joins as needed).

Here is an example [query](https://www.mindstick.com/blog/202/sub-query-in-sqlserver) to join the `Customers`, `Orders`, and `Products` tables and retrieve the columns `CustomerName`, `OrderID`, `ProductName`, and `OrderDate`.

```plaintext
SELECT
    CS.name AS CustomerName, -- Alise name of CS.name
    Odr.OrderID, -- OrderID from Orders Alise 'Odr'
    Products.ProductName,
    Odr.OrderDate
FROM
    Customer AS CS -- Alise of Customer table
INNER JOIN
    Orders AS Odr ON CS.ID = Odr.Id
INNER JOIN
    Products ON Odr.ProductID = Products.ProductID;
```

In this query:

- `Customers` is joined with `Orders` using the `CustomerID` column.
- `Orders` is joined with `Products` using the `ProductID` column.
- Specific columns from each table are selected in the `SELECT` statement.

## Read more

[**How to use searching and filtering data in an SQL server?**](https://www.mindstick.com/forum/160900/how-to-use-searching-and-filtering-data-in-an-sql-server)

[**How do I write CRUD operations to modify data in SQL Server tables?**](https://www.mindstick.com/forum/160899/how-do-i-write-crud-operations-to-modify-data-in-sql-server-tables)

[**What is SQL Keys and why is the use of it?**](https://www.mindstick.com/forum/160893/what-is-sql-keys-and-why-is-the-use-of-it)


---

Original Source: https://www.mindstick.com/forum/160909/how-to-join-multiple-tables-and-retrieve-specific-columns-in-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
