An Interactive Reference for Visualizing SQL JOINs
Join the DZone community and get the full member experience.Join For Free
JOINs, right? They can be a little tough to think about, especially when you're just starting out with SQL. Jeff Atwood's Venn diagram visualization of how JOINs work - you know, what goes in a LEFT JOIN but not a RIGHT JOIN, that kind of thing - is fairly well-established, but for a quick and interactive variation on the same idea, try this alternative from Patrick Spathon. You have your standard Venn diagrams:
But each one can be selected to display a table (along with its null values), the table to JOIN to, and the combined results of the JOIN. It's a great way to learn the difference, or to quickly reference when it's three in the morning and things are just starting to not make so much sense.
Opinions expressed by DZone contributors are their own.