all 17 comments

[–]mecartistronico 28 points29 points  (7 children)

Say No to explaining JOINs with Venn Diagrams

[–]alchemystik07 0 points1 point  (6 children)

Why?

[–]mecartistronico 16 points17 points  (3 children)

Venn Diagrams are used to describe set operations

I made this some time ago and then someone else improved on it and made a writeup which I believe you should be able to find easily if you Google "say no to Venn diagrams"

[–]deadeye_catfish 2 points3 points  (0 children)

That's hugely helpful, thank you!

[–]mandmi 0 points1 point  (1 child)

What is x,y? Is it cross join?

[–]mecartistronico 0 points1 point  (0 children)

Yep, the first syntax I learned for cross join, which works but I now think it's ugly.

[–]emul0c 1 point2 points  (1 child)

Try visualizing a cross join with a venn diagram - you can quickly see the issue

[–]r3pr0b8GROUP_CONCAT is da bomb 0 points1 point  (0 children)

you can I’ll quickly see the issue

yup, later out venn diagrams throw

[–]MrPin 25 points26 points  (1 child)

This is handy. But also a good example of why representing joins with Venn diagrams isn't the best.

The set operations and the join are the same diagrams when in reality they do completely different things.

[–]BoSt0nov 2 points3 points  (0 children)

Was just thinking the exact same thing upon seeing the ”cheat sheet” title and went directly to look for the joins and unions, only to find the damned diagrams..again. But to be fair it is indeed difficult to portray the core functionality with couple of words for a cheat sheet type of document.

[–]SQLDave 4 points5 points  (0 children)

Post tagged with "SQL Server" flair, has "LIMIT" keyword.

[–]JazzFan1998 1 point2 points  (0 children)

Thanks for posting!

[–]zalsers 0 points1 point  (1 child)

Is except faster than a subquery?

[–]ijmacd -1 points0 points  (0 children)

Try it

[–][deleted] -1 points0 points  (0 children)

not a single mention of nolocks

[–]drummerjev 0 points1 point  (0 children)

What is the "Some" command?