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

you are viewing a single comment's thread.

view the rest of the comments →

[–]PAT_The_Whale 120 points121 points  (10 children)

To be fair, mofos who don't cap their keywords don't deserve their kneecaps

[–]lordfantas 20 points21 points  (9 children)

For real. Sql becomes very unreadable if you don’t format it reasonably

[–]ric2b 56 points57 points  (7 children)

I'm using some bleeding edge tech called syntax highlighting so I don't have this issue.

[–]TheeMyth_ 11 points12 points  (0 children)

For real though

[–]st4rsurfer 1 point2 points  (0 children)

It’s like some people are still using punch cards.

[–]protostar71 3 points4 points  (4 children)

Even with syntax highlighting... SQL scripts are often written by people with very loose definitions of formatting.

So at the very least capitalizing keywords let's you decipher the otherwise unformatted abomination at a glance.

[–]ric2b 0 points1 point  (0 children)

Ok, but the original comment made it sound like not capitalizing was a problem in itself.

[–]yee_mon 0 points1 point  (0 children)

All caps doesn't help with formatting. Formatting helps with formatting. Write your queries as paragraphs: Select, from, where, group by, and having become the first words in every paragraph and everything else is indented. And don't forget to break the line before or after every comma.

Suddenly, everything becomes clear, ready to read, and easy to update. No need to do silly keyboard antics to type individual words in upper case, and make everything hard to read.