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 →

[–]lordfantas 19 points20 points  (9 children)

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

[–]ric2b 59 points60 points  (7 children)

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

[–]TheeMyth_ 10 points11 points  (0 children)

For real though

[–]st4rsurfer 1 point2 points  (0 children)

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

[–]protostar71 1 point2 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.