I welcome back to module to quick review. This is less than 2.4 left joint. And the previous lesson we took a look at the inner joint and this lesson. We're gonna switch that inner, join to a left, join and see if we get different results back. Teoh kind of highlight how these two types of joints behave differently.
So let's go ahead and run that enter, join again and get that data back.
So this is the inner joined variant.
And let's switch this to a left, join and see if the data results switches at all.
If we run this,
we get back a new record. A Diane Murphy
who has no for employee number and name when referencing the manager table.
So this highlights held a left. Join is working because Diane Murphy existed in the left table with the result that was enough to bring a record back.
she didn't have a match in the manager table, so we returned. No, which is a programs way of telling you nothing
back in the results, that so let's take a look at that table
specifically to make sure this makes sense that we haven't somehow misinterpreted the data or the way the query is written.
So I have the employees table open over here in D Beaver. This is not a query. This is strictly de beaver opening the table. If we take a look at Diane Murphy's record, we will see that she has a job title of president and the reports to field is no or empty, which
would lead me to believe that she does not have a manager, which might make sense because
she is the president.
Now, if we go back to our query
and we take a look at this and describe it again, we can see that the left table employees had Diane Murphy and the results set, so we brought her back. But there was no match for in the manager table for the reports two column. So we got no back.
So that finishes this portion of the left joint. Let's take a quick look over the
summary for this lesson,
and here we are at the left joint summary, so let's quickly review there's not too much to the left joint at its basic form.
The left join joining Key requires representation on the left table. We saw that with that Diane Record
column used Enjoying That relates to the data table records. Okay, that's the key column
and the blow Venn diagram to show that a returns all records with data shared nb as well. So Diane was in Table A
and the share data that was available and be four employees was returned. But we did get a records that didn't have a result in be back as well.
Data not. And B will return as no. And that's exactly what we saw.
So that completes this lesson. And the next lesson will go over the right join. And I hope to see you there. Thank you.