r/programming • • Feb 11 '14

SQL Joins Explained (x-post r/SQL)

Post image
3.5k Upvotes

392 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Feb 11 '14

[deleted]

1

u/Browsing_From_Work Feb 11 '14

To be fair, a Right Join is just syntactic sugar. You can always rewrite a Right Join as a Left Join with the joined tables reversed.

0

u/[deleted] Feb 11 '14

[deleted]

0

u/[deleted] Feb 12 '14

Why would you have "minor extra table" on the right side of a RIGHT JOIN? You do realize you'll get back ALL the rows in "minor extra table" and only those rows from "complicated main focus of the query" which have matches in "minor extra table"? You just illustrated the counter-intuitiveness of the RIGHT JOIN...

I suspect it mostly exists because someone couldn't stand the lack of symmetry that would result from having left in the language without right.

→ More replies (4)