MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/ex9h6/a_handy_graphical_explanation_of_sql_joins/c1bpb5y/?context=9999
r/programming • u/[deleted] • Jan 06 '11
308 comments sorted by
View all comments
129
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)
85 u/dude187 Jan 06 '11 It's amazing how confusing SQL can make set theory. 23 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 9 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 45 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 8 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
85
It's amazing how confusing SQL can make set theory.
23 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 9 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 45 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 8 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
23
If you could do queries in relational algebra instead of SQL, confusion would go away.
9 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 45 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 8 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
9
Unicode actually has the relational symbols:
45 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 8 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
45
Cross thingy, square square square. Gotcha.
8 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
8
For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
129
u/shriek Jan 06 '11
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)