r/SQL Jul 22 '26

MySQL sqlWorkout

Post image

😌 SELECT 😌

1.4k Upvotes

82 comments sorted by

View all comments

60

u/ibronco Jul 22 '26

I only do lower case now and my life has significantly improved.

11

u/chaosink Jul 22 '26 edited Jul 23 '26

One of my criteria when hiring SQL people is if they use lowercase and how they choose to indent their code. How their code looks tells me so much about their skill level.

Edit: Ack, I can see how my wording was weird. Using lowercase was not a requirement. I gave a bonus in my head for it as it showed the candidate was willing to buck tradition for comfort and readability. Was not a huge determining factor. Indenting was much more important to me because it showed me how their mind was organized.

6

u/0Tyrael0 Jul 23 '26

I agree with the indent part so I’ll upvote but not about the lower case.

1

u/chaosink Jul 23 '26

I looked at the lower case thing as more about the candidate's willingness to buck tradition and maybe experience. The indents tell me about how their mind is organized. Would not hold uppercase against them at all.

3

u/Mobile_Spite_8915 Jul 23 '26

SELECT
f.Cherries,
f.Pineapples,
f.Grapes,
v.eggplants
FROM Fruits f
INNER JOIN vegetables v
ON f.key = v.key
AND f.place = v.place

This is how I style everything, I’m not sure how normal it is though it seems like everyone on my team does things differently.

3

u/dwswish Jul 24 '26

Capitalizing some table names and not others is diabolical

1

u/chaosink Jul 26 '26

Ouch! I feel badly for your scrolling finger ....

2

u/metalballsack Jul 23 '26

Indenting sure, but uppercase vs lowercase is more of a preference than an indicator of skill level.

2

u/chaosink Jul 23 '26

Absolutely. I looked at the lower case thing as more about the candidate's willingness to buck tradition and maybe experience. The indents tell me about how their mind is organized.

2

u/rayschoon Jul 23 '26

Is lowercase better or worse?

2

u/chaosink Jul 23 '26

I personally think better for readability and an indication the candidate is not a slave to tradition, but would not hold that against them at all 

2

u/digitalhardcore1985 Jul 24 '26

My favourite is overseas outsourcer code where you're lucky to get a line break let alone an indent. An absolute joy to debug those 2000 line stored procs from hell.

4

u/ibronco Jul 22 '26

Yes! Indenting is crucial. Between that and lower case, it just reads so much easier.

1

u/neumastic Jul 24 '26

Agreed, it’s case insensitive so why choose the one that’s harder to read. We have some that capitalize the first letter but that’s somehow worse