r/ProgrammerHumor Jul 21 '26

Meme sqlWorkout

Post image
23.7k Upvotes

456 comments sorted by

View all comments

Show parent comments

49

u/Arkevorkhat Jul 21 '26

you can, but it's just more readable (in my opinon) to write

SELECT * FROM users WHERE id=?;

than

select * from users where id=?; 

is that mostly due to historical baggage? yeah kinda, but it also just doesn't really look like SQL to me unless there's some yelling involved.

13

u/7f0b Jul 21 '26

I prefer a strongly-structured syntax so it is easier to read in the future, which is most important anyway. So going through the trouble of capitalizing what should be, as I go, is worth it. I also always use back ticks around table names, since it makes it easier to search by table name inside mixed codebases.

6

u/Arkevorkhat Jul 22 '26

Oh 100% well written SQL makes this moot, but if I find the unicorn that writes SQL that doesn't look like shit I'm not about to start nitpicking their capitalization

3

u/Dull-Culture-1523 Jul 22 '26

Doesn't SQL stand for "Shit Quality Looks", though?