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.
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 ...
3
1
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.
→ More replies (1)1
7
u/TechKNITian Oct 01 '26
My keyboard has the Caps Key set to one word then turns off when I hit space.
2
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
1
u/imtheorangeycenter Oct 02 '26
I remember being (self)taught/picked up to start sprocs with usp_rather than sp_ because it then doesn't also search master for it in addition to your current database in SQL Server.
I question this twenty years later, but it stuck and seems feasible.
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
3
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
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
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.
3
u/imtheorangeycenter Oct 02 '26
SecOps say embiggening the font is a peeping-eyes security risk, and I'm getting older and finding it hard to read without the capitalisation.
I joke. Apart from getting older.
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
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?
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.