---
title: "SQL Server Join and Its Types"  
description: "In this Article i am going to show What is Join in Sql Server and Its Type"  
author: "Niraj Kumar Mishra"  
published: 2017-08-21  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/12538/sql-server-join-and-its-types  
category: "mssql server"  
tags: ["database"]  
reading_time: 2 minutes  

---

# SQL Server Join and Its Types

#### SQL JOINS

A JOIN is used to combines rows from two or more tables, based on a related column between them. In other words JOINS are used to [fetch data](https://www.mindstick.com/forum/160510/how-to-fetch-data-from-the-database-in-the-dot-net-console-application-using-c-sharp) from two or more tables. When you want to perform a SQL statement to attached two or more table’s column then we use [SQL JOINS](https://www.mindstick.com/articles/1436/sql-joins).

##### Types of Joins:

**•** [INNER JOIN](https://www.mindstick.com/blog/304465/difference-between-inner-join-left-join-right-join-and-full-outer-join-in-sql-server) (simple join)

• [LEFT OUTER JOIN](https://www.mindstick.com/articles/12231/types-of-join-in-sql-server) (LEFT JOIN)

• RIGHT OUTER JOIN (RIGHT JOIN)

• [FULL OUTER JOIN](https://www.mindstick.com/forum/1216/full-outer-join-on-2-data-tables-with-a-list-of-columns) ([FULL JOIN](https://www.mindstick.com/forum/162063/what-is-the-difference-between-inner-join-left-join-right-join-full-join))

Let’s see in Examples:

We have 2 Tables ‘Employee’ and ‘Company’:

##### Employee

**\**![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/d2cc26b0-6d84-4b03-aaa9-146ff2281037.png)**\**\

##### Company

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/aeda3a28-3b34-4d85-861f-565959ca126d.png)**\**

\

##### INNER JOIN (simple join):

If you want to use Inner join then you use **INNER JOIN** keyword or **JOIN.**

By using **INNER JOIN** only those record are fetched that are satisfy the condition in both table.

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/e57e82d6-cc05-4554-b5ca-4231eba76708.png)\

##### INNER JOIN Syntax

```
SELECT column name(s)
FROM table1
INNER JOIN table2 ON table1.column_name = table2.column_name;
```

##### Example:

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/6877122b-e2ab-411e-9bcd-f36b7d5db523.png)**\**

##### LEFT OUTER JOIN (LEFT JOIN):

When you are use **LEFT JOIN** OR **LEFT OUTER JOIN** thenit returns all records from the left table and matched record from the right table. It [return NULL](https://www.mindstick.com/forum/34356/facebook-email-field-return-null-even-if-the-email-permission-is-set-and-accepted) from the right side, if there is no match.

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/6a6ae53d-4d90-46e1-95f5-41afbe737cf1.png) \

##### LEFT JOIN Syntax

```
SELECT column name(s)
FROM table1
LEFT JOIN table2 ON table1.column_name = table2.column_name;
```

##### Example:

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/ecc8b38f-9d3a-4f45-8d1c-805f0b603c04.png)**\**

##### RIGHT OUTER JOIN (RIGHT JOIN):

When you are use **RIGHT JOIN** OR **RIGHT OUTER JOIN** thenit returns all records from the right table and matched record from the left table. It return NULL from the left side, if there is no match.

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/3d02d78c-9450-4f33-8fcc-53dbd6932924.png)\

##### RIGHT JOIN Syntax

```
SELECT column name(s)
FROM table1
RIGHT JOIN table2 ON table1.column_name = table2.column_name;
```

##### Example:

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/996117b3-ded5-42b3-b60d-8a14a7c7ac8c.png)\

##### FULL OUTER JOIN (FULL JOIN):

When you are use **FULL JOIN** OR **FULL OUTER JOIN** thenit returns all records from the [Right and Left](https://www.mindstick.com/forum/33603/how-to-set-text-in-table-cell-to-right-and-left-in-ios) table with matched and Non-matched with [NULL value](https://www.mindstick.com/forum/23045/document-body-appendchild-has-a-null-value).

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/73706f3b-6b31-4913-843b-1bed4292ad74.png)\

##### FULL JOIN Syntax

```
SELECT column name(s)
FROM table1
FULL JOIN table2 ON table1.column_name = table2.column_name;
```

##### Example:

![SQL Server Join and Its Types](https://www.mindstick.com/mindstickarticle/87c807ae-1138-4ab2-b3b0-a416c8f0bd99/images/09c183d8-f768-401e-a112-3628c58b50d4.png)\

\

I hope you are Understand Join Concept Thank you…

\

\

\

\

\

**\**

**\**

**\**

**\**

---

Original Source: https://www.mindstick.com/articles/12538/sql-server-join-and-its-types

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
