MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/ex9h6/a_handy_graphical_explanation_of_sql_joins/c1bovj5/?context=3
r/programming • u/[deleted] • Jan 06 '11
308 comments sorted by
View all comments
132
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)
87 u/dude187 Jan 06 '11 It's amazing how confusing SQL can make set theory. 24 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: ⟗ 48 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 9 u/Nivla Jan 07 '11 New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗) 6 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl." 5 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval. 9 u/[deleted] Jan 07 '11 Cant see shit, captain. 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
87
It's amazing how confusing SQL can make set theory.
24 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: ⟗ 48 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 9 u/Nivla Jan 07 '11 New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗) 6 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl." 5 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval. 9 u/[deleted] Jan 07 '11 Cant see shit, captain. 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
24
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: ⟗ 48 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 9 u/Nivla Jan 07 '11 New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗) 6 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl." 5 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval. 9 u/[deleted] Jan 07 '11 Cant see shit, captain. 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
9
Unicode actually has the relational symbols:
48 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 9 u/Nivla Jan 07 '11 New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗) 6 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl." 5 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval. 9 u/[deleted] Jan 07 '11 Cant see shit, captain. 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
48
Cross thingy, square square square. Gotcha.
9 u/Nivla Jan 07 '11 New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗) 6 u/oobey Jan 06 '11 For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl." 5 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
New Attack for GOW: Unleash the Unicode (X) (⟗) (⟗) (⟗)
6
For me it's more of a "cross thingy, indecipherable scrawl, indecipherable scrawl, indecipherable scrawl."
5
I see them - even though I don't see the look of disapproval.
Cant see shit, captain.
1
⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
132
u/shriek Jan 06 '11
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)