How to Work With Outer Join in SQL

In this article I am going to explain how to work with outer join.
  • 2086

Introduction

Here I am going to explain what is outer join and why we use outer join. Outer join retrieve data from two or more than two tables same as inner join. Outer join differ from inner join. In outer join, it retrieves all data that satisfy the join condition plus unmatched rows in one or both tables. Outer clause is optional in statement.

There are three types of Outer Join

  • Left Outer Join
  • Right Outer Join
  • Full Outer Join

A Statement that create mcninvoices table

inv.jpg

Statements that insert data in mcninvoices table

inv (2).jpg

A Statement that is used to fetch data from mcninvoices table

inv111.jpg

A Statement that create vendors table

ven.jpg

Statements that insert data in vendors table

ven (1).jpg

A Statement that is used to fetch data from vendors table

ven (2).jpg

A Statement that retrieve data from two table using Left Outer Join

Clipboard02.jpg

© 2020 DotNetHeaven. All rights reserved.