• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 15. Power Query Techniques > Working with Outer Joins

Working with Outer Joins

Outer joins are used when you want the records on the “one” side of a one-to-many relationship to be included in the query result, regardless of whether there are matching records in the table on the “many” side. With a Customers table and an Orders table, for example, users often want to include only customers with orders in the query output. An inner join (the default join type) does this. In other situations, users want all customers to be included in the query result, regardless of whether they have orders. This is when an outer join is necessary.


There are two types of outer joins: left outer joins and right outer joins. A left outer join occurs when all records on the “one” side of a one-to-many relationship are included in the query result, regardless of whether any records exist on the “many” side. A right outer join means all records on the “many” side of a one-to-many relationship are included in the query result, regardless of whether there are any records on the “one” side. A right outer join should never occur if referential integrity is being enforced because all orders should have associated customers.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint