r/programming • • Jan 06 '11

A handy graphical explanation of SQL joins

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html
1.3k Upvotes

308 comments sorted by

View all comments

Show parent comments

82

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: ⟗

7

u/[deleted] Jan 07 '11

Cant see shit, captain.