r/SQL • u/Biscuit_the_boston • Oct 01 '26
Discussion Does anyone else just leave caps on when naming your variables ?
I might just be lazy but I feel like it saves me effort.
13
Upvotes
r/SQL • u/Biscuit_the_boston • Oct 01 '26
I might just be lazy but I feel like it saves me effort.
41
u/Eleventhousand Oct 01 '26
I held down shift every time for about the first twenty years.
Since then, I'm fine with just using lowercase for everything.
20
u/serverhorror Oct 01 '26
I write everything in lower case. Our formatter/linter takes care of things.
I'm not wasting brain cycles on that ...
11
u/Aggressive_Ad_5454 Oct 01 '26
I use caps for keywords and lowercase for identifiers. Why? MySql that needs to run on Windows and also on case sensitive OSs.
7
u/TechKNITian Oct 01 '26
My keyboard has the Caps Key set to one word then turns off when I hit space.
4
u/alegendmrwayne Oct 01 '26
Gods I tried to stick to uppercase keywords for the longest time. But now I’ve quite happily settled into lowercase keywords, PascalCase tables, columns and camelCase vars. usp_, ufn_ and vw_ prefixed stored procs, functions and views
Life is so much easier now
7
u/ApresMoi_TheFlood Oct 01 '26
All lowercase everything. I can’t be bothered to work my pinky by pressing shift or caps lock.
3
u/Pearlsnap Oct 01 '26
Lowercase and tabbing thru SQL prompt like an adult.
3
u/RandomiseUsr0 Oct 01 '26 •
ARE YOU EVIL?
6
u/Similar_Command7256 Oct 01 '26
lowercase on everything. our brains read and process it much easier than caps.
2
u/OO_Ben Postgres - Retail Analytics Oct 01 '26
All lowercase with very good formatting. Formatting does way more than upper case in my opinion in terms of readability
2
u/Infini-Bus Oct 01 '26
I just do all lowercase and then use autoformat.
2
u/NullVal Oct 01 '26
Yes everything is uppercase, because it feels like I get to yell at the computer through the code :)
2
u/bishnabob Oct 02 '26
Upper case is very shouty, and I have enough of that with the kids.
3
u/Zestyclose-Turn-3576 Oct 01 '26
The whole uppercase keyword thing is like a bizarre fetish. A completely pointless ritual, from the days when people erroneously thought it improved the chances of an exact match on SQL making parsing more efficient, and made entirely obsolete by colour coded syntax highlighting, if you like that sort of thing. Even Fortran doesn't do it any more https://stdlib.fortran-lang.org/page/contributing/StyleGuide.html
To be gracious though, I'll grudgingly accept one downvote for every rational reason for doing it in 2026.
1
u/NeoChrisOmega Oct 01 '26
I like to hold down the shift key. It makes more sense to me because I also use underscores which requires the shift key anyhow.Â
When typing normally, I also have the same habit, because it feels more impactful when I have to hold down the key to emphasize the word
1
u/givibeg Oct 01 '26
I use lowercase and SQL formatter.
1
u/mlhigg1973 Oct 01 '26
Everything’s in lower case, except where I comment out important notes throughout
1
u/ADubiousDude Oct 02 '26
😱
I don't even know you anymore. Who hurt you? Where did it all go wrong?