How to Work With Right Outer Join in SQL

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

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

When we use right outer join to retrieve data it retrieve all rows in result set from second or right table.

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 Right Outer Join

Clipboard04.jpg


© 2013 dotNetheaven. All rights reserved.