DEV Community

Discussion on: SQL tips for beginners; what I learned after 10+ years of occasionally writing queries and schemas as a web dev

Collapse
 
aarone4 profile image
Aaron Reese

yes key words are case insensitive. As for shouty-case I am OCD about code layout and for me readablity is improved by keywords and built in functions being UPPERCASE along with proper indentation of fields in the SELECT and tables in the WHERE...JOIN clauses.

Thread Thread
 
rap2hpoutre profile image
Raphaël Huchet

That's a valid point, thank you for sharing! I was not aware of this issue (people sometimes ignore issues when they are not concerned), this should be considered indeed! Out of curiosity, how do you deal with language that does not encourage shouting? Is syntax highlighting helping in some way?

Again you pointed out an opinion: I feel like it's harder to READ TEXT IN UPPERCASE, but it may be only a matter of taste and personal comfort. I was ignoring real issues.

I should dig into why in the first place uppercase was used for SQL. There should be a reason!

Again thanks you for your feedback!

Thread Thread
 
pentasis profile image
Bert

SQL is a 'very' old language (early '70s if I'm not mistaken). Terminals at the time only used capital letters. The manuals reflected that and it became a historical norm. It was never a choice nor mandatory to have them capitalized.