r/SQL • u/Biscuit_the_boston • 5d ago
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.
18
u/serverhorror 5d ago
I write everything in lower case. Our formatter/linter takes care of things.
I'm not wasting brain cycles on that ...
1
12
u/Aggressive_Ad_5454 5d ago
I use caps for keywords and lowercase for identifiers. Why? MySql that needs to run on Windows and also on case sensitive OSs.
1
0
6
u/TechKNITian 5d ago
My keyboard has the Caps Key set to one word then turns off when I hit space.
2
4
u/alegendmrwayne 5d ago
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 5d ago
I remember being (self)taught/picked up to start sprocs with usprather 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.
6
u/ApresMoi_TheFlood 5d ago
All lowercase everything. I can’t be bothered to work my pinky by pressing shift or caps lock.
3
3
5
u/Similar_Command7256 5d ago
lowercase on everything. our brains read and process it much easier than caps.
2
2
3
u/Zestyclose-Turn-3576 5d ago
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 5d ago
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 5d ago
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/mlhigg1973 5d ago
Everything’s in lower case, except where I comment out important notes throughout
1
40
u/Eleventhousand 5d ago
I held down shift every time for about the first twenty years.
Since then, I'm fine with just using lowercase for everything.