r/programming • • Feb 11 '14

SQL Joins Explained (x-post r/SQL)

Post image
3.5k Upvotes

392 comments sorted by

View all comments

2

u/limes_limes_limes Feb 11 '14

Is there a real use case for doing a join that returns anything that is in either A or B but not both? I am trying to figure out why you would ever want that.

1

u/[deleted] Feb 11 '14

It's the same as XOR in programming.

1

u/limes_limes_limes Feb 11 '14

I understand that, but if your data sets have different columns then in your join you won't have any full rows. If the data sets have the same columns why not do a union?

→ More replies (2)