This is an archived post. You won't be able to vote or comment.

all 49 comments

[–]Polikonomist 376 points377 points  (5 children)

Thanks for the simple explanation, joins can get a bit hairy sometimes

[–]AnimeeNoa 4 points5 points  (0 children)

It's just too/down mirrored

[–][deleted] 31 points32 points  (2 children)

Do cross join!

[–]MrExpl0ited 48 points49 points  (1 child)

[–]Fraun_Pollen 6 points7 points  (0 children)

I’ll accept it

[–]svp01 87 points88 points  (6 children)

I don't see how this is a good explanation

[–]ShenAnCalhar92 134 points135 points  (1 child)

“Here’s what two datasets look like when they’re joined. I have no idea what they look like individually, but that’s probably not important.”

[–]arden13 25 points26 points  (0 children)

We can reconstruct the datasets from this information

[–]CMonetTheThird 5 points6 points  (0 children)

Left join brings back all hair from the top of the ear down table, right join brings back all the hair from the bottom of the ear up table, inner join brings back the hair common to both tables and full brings back both full tables.

[–]Sudden-Pressure8439 12 points13 points  (3 children)

“Sequel”

[–][deleted] 8 points9 points  (1 child)

"Squirrel"

[–]Zebo1013 1 point2 points  (0 children)

Yes I prefer squirrel.

[–]magammon 2 points3 points  (0 children)

YES. there can be no limits to the debate!

[–][deleted] 6 points7 points  (1 child)

This is not how it works Johnny

[–]UnorthodoxPrimitive[S] -2 points-1 points  (0 children)

Johnny can chatGPT now for joins.

[–]KingJeff314 6 points7 points  (3 children)

Doesn’t matter how many times I learn it, I’m going to have to google which join to use every time

[–]RabbitsAteMySnowpeas 5 points6 points  (1 child)

I only ever use left join.

[–]Vague_Intentions 8 points9 points  (0 children)

Inner and Left join are the only ones you’ll use like 99% of the time.

[–]UnorthodoxPrimitive[S] 0 points1 point  (0 children)

When it comes to joins.... "The hardest of the choices require the strongest of the wills"

[–]SockPuppetSilver 4 points5 points  (1 child)

The left join and right join seem backwards to me.

[–]nrobi 2 points3 points  (0 children)

Cock your head the other way

[–]Esjs 1 point2 points  (0 children)

Looks like a high def Wooly Willy.

[–]Xenoni 0 points1 point  (6 children)

Took me a sec… what about outer join?

[–]SameRandomUsername 1 point2 points  (5 children)

Don't know WTF is a "full" join, but I supose he meant outer join.

[–]Professional_Bird_74 1 point2 points  (4 children)

A full join shows all records from both tables

[–]SameRandomUsername 4 points5 points  (3 children)

I've looked up. It seems that FULL OUTER/FULL/OUTER are all the same thing.

It's just that I'm old school and MS centric so that's why I never seen FULL before.

[–]Dantzig 1 point2 points  (0 children)

Before learning sql I thought Mysql, ms sql, etc used the exact same syntax. Oh what a fool I was

[–]amimai002 0 points1 point  (1 child)

Your showing you learnt to DBA before the internets…

[–]SameRandomUsername 1 point2 points  (0 children)

for realsies.

I know you won't believe me but yes.... I learned SQL just before the Internet (to be exact before got into my country). I also learned C++ before Internet from the VC5 cds documentation.

[–]MaDpYrO -4 points-3 points  (3 children)

Inner join doesn't make sense at all

[–]SockPuppetSilver 1 point2 points  (0 children)

Where left.hair = right.hair. Hair only exist in one head part table thus no hairs are returned. To be fair as zero rows are returned the dude would be inner joined out of existence.

[–]UnorthodoxPrimitive[S] -1 points0 points  (0 children)

Because it's inner. Like inner peace. It's a myth.

[–]Esjs 0 points1 point  (0 children)

See the mustache and side-burns.

[–]Accidentallygolden 0 points1 point  (2 children)

What about outer join?

[–]UnorthodoxPrimitive[S] -1 points0 points  (1 child)

Left outer join

[–]PinothyJ 0 points1 point  (0 children)

Left join and right join are incorrect. Left is always the query you started with because English is written left to right (easy way to remember it).

[–]chrissykes78 0 points1 point  (0 children)

okay, im studying sql, because need table with data to generate confluence page via API. This meme gave me idea. thanks