|
SQL Home
SQL TutorialIntroductionSQL Syntax SQL Select SQL Where SQL Order By SQL Top SQL Distinct SQL In SQL Alias SQL Join SQL Inner Join SQL Outer Join SQL Insert SQL Update SQL Delete SQL Functions SQL Count SQL Create SQL Create Database SQL Create Table SQL Create Index SQL Alter Table SQL Summary |
SQL Outer JoinThis lesson covers both the left outer join, the right outer join, and the full outer join, and explains the differences between them. There are some occasions where you would need to use a left outer join or a right outer join, and others where you would need a full outer join. The join type you use will depend on the situation and what data you need to return. Left Outer JoinUse this when you only want to return rows that have matching data in the left table, even if there's no matching rows in the right table. Example SQL statement
Source TablesLeft Table
Right Table
Result
Right Outer JoinUse this when you only want to return rows that have matching data in the right table, even if there's no matching rows in the left table. Example SQL statement
Source TablesLeft Table
Right Table
Result
Full Outer JoinUse this when you want to all rows, even if there's no matching rows in the right table. Example SQL statement
Source TablesLeft Table
Right Table
Result
|
Need Website Content?
Get unique, quality digital content for your website.
|