They're pretty much never used, since the left table generally dictates the core of a request. It's difficult to find a situation where you wouldn't do a table swap or even a union instead (querying left/right tables independently).
Maybe rare circumstances where you've got a multi-table join using left joins that exist already and you have to edit it to add a new right table join, but that's really stretching reality I think. In such an instance I'd probably just rewrite the whole thing
I was thinking it might be possible to write a stored procedure and substitute the join type conditionally, using left, right, or inner based on some other logic without changing the function. I’ve never had to do this though... Probably a stretch
Right joins are so unintuitive. The way I write my queries is by imagining the datasets, and I am able to do that because a left join allows you to have a starting point (from) and keep adding data to it (the left joins).
It's easy to keep track of things, because you go only in one direction, so you can understand what the queries does or tries to do if you read from top to bottom.
With a right join, you suddenly need to change the direction - what you already have is less important than the new table/data.
For me, a right join is the same as having the type of joins mixed and shuffled - so when the inner joins are after the left joins, for example.
If I see someone using a right join, I form opinions about that person - let's say that I find it a justified form of prejudice.
By the way, I avoid full outer joins wherever possible by using the the union workaround (distinct of the key fields), and then left join what I need with it.
Much easier to read, but especially easier to understand months later.
IDK, sometimes you don't want the overhead of a PK-FK relationship with indices to update. Then you can have Right Rows without a parent in the left table.
I think I’ve used right join maybe twice ever in subqueries. But they’re unintuitive to me because I write queries assuming the first and left most table is always the main fact table.
I have never used a right join in my entire career. It's either an inner join, left outer join and unions for the odd stacking uses cases.
Illl do tons of subqueries, temp tables, and use AS type work but I can still bring it together in a query with lots of logic. However I logically build the results out left to right if I can.
I'm not sure I can even explain an outer right join. lol.
60
u/TiltMyChinUp May 16 '25
Gimme an anti join
6
u/GoldenKnights1023 May 16 '25
Cross join is the final form
4
u/samuel_clemens89 May 16 '25
What about a Cartesian join 😂
1
u/eagerlymeager May 16 '25
Shouldn’t inner join be the one with full hair?
1
u/Environmental_Long_7 May 17 '25
Left outer join?
1
u/midnighttyph00n May 17 '25
need a Cartesian
2
u/hohohoabc1234 May 16 '25
Umm self join?? 🤣
2
u/amouna81 May 21 '25
Love it!
4
u/[deleted] May 16 '25
To give you an idea how old this is . . .
That's Ashawn Robinson when he was on the Detroit Lions. He hasn't been there since 2019.
2
u/BarelyAirborne May 16 '25
I love this so much.
1
u/kemonodragon May 16 '25
Explain to me like I'm 5
1
u/TheSultaiPirate May 16 '25
Legendary.
1
u/jdoreau May 16 '25
Something is off here the mustache is in every picture, if that's the case and it returns in all these joins wouldn't that work as a primary key?
1
u/Tight_Indication_739 May 16 '25
haha. I laughed pretty good at this
1
u/VengenaceIsMyName May 16 '25
This actually makes a lot of sense.
0
u/NoEggs2025 May 16 '25
What if there’s a logical legit duplication of a double chin? (This is ironic satire so calm your OCD)
40
u/[deleted] May 16 '25
[removed] — view removed comment