DEV Community

Discussion on: 10 Things I Hate About SQL

Collapse
 
geraldew profile image
geraldew

Next #2 UPPERCASE

Ah, the classic language argument - and one with no winners.

Except of course, this is not a requirement at all with SQL, it's just a common style. Do what you like, your code will work.

Personally I like it, but then I date from programming in Modula-2 where it was mandatory as well as a time before colour displays and syntax highlighting. In the green-on-black screens and crude dot matrix printouts, the UPPERCASE words stood out nicely.

Maybe that colours my view, but it means with your examples, yes, the one with uppercase keywords was easier for me to read.

I suspect what you want/need is a syntax highlighting editor that does CASE display change along with colour.

And we haven't even discussed line and indent formatting of SQL scripts, which is where the real bun fights take place. I'd say the various habits and preferences of that make the uppercase/lowercase thing look like a mild issue.

Collapse
 
shaqq profile image
Shaker Islam

Of course! This is one of many the "petty" complaints I had.

The usage of uppercase and formatting & such is very subjective. In my view, there's at least a few things to note against the use of uppercase:

  1. Uppercase as a format is much harder to type. Often when we're writing queries, we want to quickly iterate, and even small roadblocks can be frustrating when we want to focus on analysis
  2. While it's true that uppercase was much more common for older programming languages, it's not true for popular programming languages in the past 20 years (that I'm aware of). It's simply not a format that the next generation of analysts & engineers are used to, and we should adjust.