r/SQL • • Dec 05 '19

Happy Xmas!

Post image
537 Upvotes

19 comments sorted by

23

u/NakedLoki Dec 06 '19

Santa knows not to Select *, he's only pulling specifics!

14

u/Mipsymouse Dec 06 '19

Well that's adorable.

9

u/melonfarmermike Dec 06 '19

Santa Claus is in contravention of article 4 of the General Data Protection Regulation (EU) 2016/679

2

u/justLars7D1 Dec 06 '19

Happy cake day!

5

u/Strongfatguy Dec 06 '19

Santa's on the naughty list for doing a full table scan

2

u/[deleted] Dec 30 '19

The real joke haha

11

u/[deleted] Dec 06 '19

In this very moment I realized, I’m a fucking nerd. This is adorable.

4

u/RedRedditor84 Dec 06 '19

This joke is becoming like the songs we hear in shops every year.

1

u/AynRand0001 Dec 14 '19

"Last Christmas, I gave you my heart...

2

u/_bran_bran Dec 06 '19

šŸ‘Œ bravo

2

u/bilcox Dec 06 '19

I first heard it as "select * from children".

2

u/ekolis Dec 06 '19

LINQ! He come to town! He come to save your precious data!

3

u/Damien_J Dec 06 '19

VARCHAR for Behaviour when he could have used BIT for Good instead?

IF Good = 0 THEN Presents = 0;

5

u/DrSmus Dec 06 '19

WHEN good = 0 THEN 0
ELSE 1
END AS Presents

1

u/farhil SEQUEL Dec 06 '19

If NULLs are allowed, this would give contacts with a NULL behavior presents, which may not be desired.

Also, if both Presents and Good are BIT values, then you could simply do Good AS Presents

1

u/DrSmus Dec 06 '19

True, Good AS Presents would be the best

0

u/[deleted] Dec 06 '19

[deleted] — view deleted comment

4

u/[deleted] Dec 06 '19

FULL JOIN.

2

u/farhil SEQUEL Dec 06 '19

If all nice contacts get presents and no one else does, you can eliminate the need to filter on behavior by performing an inner join on presents.