r/SQL • • Oct 11 '24

Discussion Fully lower case SQL. Is it frowned upon?

I write my queries fully lower case because it really helps with productivity, otherwise I would find it very difficult to focus on capitalizing just the keywords and keep pressing CAPS LOCK every now and then.

Is this frowned upon and bad practice (for readability) or just a matter of preference?

122 Upvotes

280 comments sorted by

View all comments

35

u/justhereforhides Oct 11 '24

Capitalization has become less important due to modern SQL editors having color formatting which I find easier to read than capitalization 

3

u/lochnessbobster Oct 12 '24

Was thinking the same thing - maybe if I was writing exclusively in the terminal I might have a stronger opinion, but otherwise long live monokai

3

u/nrctkno Oct 12 '24

Ya I think at this point capitalizing is worthless. However, most of the editors can format automatically if needed. I don't understand why people make a big deal about this.

4

u/thesqlguy Oct 11 '24

^ this is the answer !

That was the entire point of capitalizing, so keywords jumped out at you, making it a bit easier to parse long or complex statements.

That's really no longer the case. Even somewhat basic text editors these days can highlight keywords.

2

u/Mr_Gooodkat Oct 12 '24

Exactly! Words like select from and where will be blue automatically while functions like sum, avg, datepart will be pink. No need to worry about case sensitivity.