I recently learned about JOINS. I don't understand why there is a left or right outer JOIN. For left outer JOIN can't you just reverse the order you write the table around the JOIN to turn it into a right outer JOIN?
Asked
Active
Viewed 46 times
0
-
does this answer your question ? https://stackoverflow.com/questions/5706437/whats-the-difference-between-inner-join-left-join-right-join-and-full-join – phoenixstudio Jan 30 '21 at 00:29
-
@phoenixstudio obviously not – hobbs Jan 30 '21 at 00:31
-
2I agree that it is hard to understand why `RIGHT OUTER JOIN` exists when you can do the same with a `LEFT OUTER JOIN` which is even more readable, because you outer join the next table to what you already have. I suppose they just thought it would be nice to have a choice when deciding for the joins in 1992. But `RIGHT OUTER JOIN` turned out to be less readable as mentioned and its use is discouraged. I don't know any advanced SQL developer who uses them. And my advice is: Don't ever use `RIGHT OUTER JOIN` either. – Thorsten Kettner Jan 30 '21 at 00:35
-
1Does this answer your question? [What's the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN?](https://stackoverflow.com/questions/5706437/whats-the-difference-between-inner-join-left-join-right-join-and-full-join). See in particular the second answer. – Ken White Jan 30 '21 at 00:36
-
1When you have more than 2 tables involved using RIGHT can be simpler sometimes https://stackoverflow.com/a/7313507/73226 – Martin Smith Jan 30 '21 at 00:36
-
@MartinSmith I only work with 2 tables so far maybe when I graduate to 3 I will start using RIght JOIN – bakalolo Jan 30 '21 at 00:38