this post was submitted on 19 Oct 2023
1717 points (98.8% liked)

Programmer Humor

32503 readers
496 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] NedDasty@lemmy.world 14 points 1 year ago (2 children)

You indent your JOIN? Why on earth? It lives in the same context as the SELECT.

[–] xmunk@sh.itjust.works 8 points 1 year ago

I've seen both approaches and I think they're both quite reasonable. An indented join is my preference since it makes sub queries more logically indented... but our coding standards allow either approach. We've even got a few people that like

FROM foo
JOIN bar ON foo.id = bar.fooid
JOIN baz ON bar.id = baz.barid
[–] callcc@lemmy.world 6 points 1 year ago (1 children)

Actually not. It's part of the FROM

[–] Stumblinbear@pawb.social 2 points 1 year ago

That double indented from is hurting me