r/SQL • u/BrilliantLeast7083 • Mar 25 '26
Discussion When to use RIGHT JOIN instead of switching tables in Left Join
Hello all! I need some help with understanding the utility of Right join. I have 2 tables: Orders and Customers. If I write Orders RIGHT JOIN Customers it returns the same results as switching tables and using left join, like Customers LEFT JOIN Orders. But when these 2 examples can give different results? Like when it is mandatory to use right join instead of just switching tables in left join?
35
Upvotes
View all comments
Show parent comment
0
u/jshine13371 Mar 26 '26 edited Mar 26 '26
You're saying a statement I made that is non-absolute ("tends" - my words, followed up with "Not always the case") is absolutely wrong ("is false therefore") because it's a subset of a larger group of things that are also true ("Outer join's also sometimes are better rewritten as unions of some kind... - your words). You realize how silly what you just said is?
Not to mention there are other use cases, exclusive to
FULL JOINs where my previous statement holds true, yet you decided to definitively rule it as "false" anyway. I guess if you knew everything already, your reply asking for more information was pointless...I'm not going to argue with someone who's looking for an argument and is lacking reading comprehension.