Okay I'm back with a very quick EDITION.
This is a frequently asked question that I get pretty often which is is there really a big difference
between right and left joins if we just change the order of what we're joining.
And the answer is No they're actually the same.
So if we do a left join where this is customers a.
And then on the right we have orders that's identical to doing a RIGHT JOIN.
If instead we put customers over here and we put orders under way.
So think of it as just you know flipping this there's no difference.
So let me show you an example.
If we go and we go grab our simple left join from way back here.
This one right here simpleness left join and I will paste it down here just you have it to see.
And let's paste it in as well.
OK.
First of all there's a lot to look at right.
But what's most important is that we have on the left customer's information first and then on the right
we have our order information right.
And then we have Knoll's where we don't have a matching order.
OK.
So what happens if we try and do the same thing.
But instead of doing customers first we do orders and we do a right join customers on customers that
ID equals orders customer ID.
OK.
So if we do this look at what we get here.
So we have the exact same data.
One two three four five rows one two three four five but the order that they're printed is different.
Right.
So we have on the left side now we have our orders information and then on the right we have our customers
information but the actual data that's displayed is the same.
Yes the order changes but that's know trivial.
That doesn't matter.
So in effect these are equivalent.
And in fact some like some environments that I've come across some developing environments won't even
support a right join and they just want to do a left join and switch the order.
So to actually to sum up one more time let's say I did the same thing here with orders and customers
but I did a left join.
What would happen now.
What's a left join with orders first and then customers.
And the answer is it's the same as doing a right join.
Except if we start with customers and then orders.
And unfortunately we don't really have anything to see right because our data doesn't have any discrepancies
on the order side.
This was the entire last video was about which I will not retread here but my point is that they look
the same and they look just like an inner join us well but when we have something different like with
our left join for customers and orders you can see that the data is actually the same.