1.6k
u/SageLeaf1
Jul 21 '26
•
Yelling at the machine makes it listen. SELECT that shit. FROM there. Got it?
489
u/Joniff Jul 21 '26
You do need to shout, the database is hosted on another machine.
140
u/Confident-Ad5665 Jul 21 '26
Louder if the machine is off sight
45
→ More replies (1)15
u/ClipboardCopyPaste Jul 21 '26 edited Jul 21 '26
Make sure your voice actually reach servers overseas
24
u/aoeudhtns Jul 21 '26
Shout, shout, join it all out
These are the rows that we care about
C'mon
I'm indexing you, c'mon
→ More replies (1)8
7
u/payne_train Jul 21 '26
I need to ask you to stop..that shouting.. it’s making people nervous.
→ More replies (4)7
u/ClipboardCopyPaste Jul 21 '26
Shouting forces the processor prioritise your request on the cloud.
/s
→ More replies (2)4
u/necrophcodr Jul 21 '26
Nah all my databases are on the same machine on the same disk, and there's no database server, but I still shout. It is proper etiquette after all!
41
4
u/AmericanBillGates Jul 22 '26
Mr Sageleaf,
There is no need to yell and cuss.
One of the two will suffice.
4
u/XtraFlaminHotMachida Jul 22 '26
we bout to DROP THIS TABLE LIKE ITS HOT. OH FML.
→ More replies (1)2
2.4k
u/NormanYeetes Jul 21 '26
the elites don't want you to know this but you can type lowercase SQL queries no ones forcing you to shout them at the screen
705
u/Totallycomputername Jul 21 '26
If I don't type in caps then the query wont take itself seriously.
119
u/Achaidas Jul 22 '26
The real question is this:
, comma before
or comma after ,
40
→ More replies (11)80
u/dexters_trap_house Jul 22 '26
Comma before? Are you the same guys who get in the shower and then turn the water on?
→ More replies (4)212
u/PerpetuallyDistracte Jul 21 '26
I've been writing SQL for 15 years. Eventually you get bored of all lowercase or all uppercase AND START writing your QUERIES LIKE this. Just a psychotic mishmash of muscle memory, laziness, and autocomplete all fighting each other within the same statement.
81
u/Ashdog73 Jul 21 '26
This. My queries are lowercase for the stuff I typed myself and caps for bits I've copied in from somewhere else
34
u/cantgrowneckbeardAMA Jul 21 '26
Lowercase on first draft (it will fail to run anyways).
Uppercase if I ever end up showing the query to someone (hopefully it doesn't fail when they run it)→ More replies (6)15
6
u/Susarn Jul 22 '26
I started writing sql 13 years ago. I started writing like this from the beginning because that was the way I saw the queries written on the tutorials, took me like a year to notice it was case independent
→ More replies (3)6
1.1k
u/ClipboardCopyPaste Jul 21 '26
YOU CAN BUT THAT DOESN'T MEAN YOU SHOULD.
GOD DOESN'T LOVE MEN WHO WRITE SQL IN LOWERCASE.
/S
343
u/Shambolic_Potato Jul 21 '26 edited Jul 22 '26
SELECT * FROM WHAT THIS GUY SAYS
Edit: Typo lmfao
164
9
209
52
16
16
12
→ More replies (2)7
62
31
u/FormerWorker125 Jul 21 '26
Lowercase for anything you named yourself, UPPERCASE FOR EVERYTHING ELSE.
3
49
u/Arkevorkhat Jul 21 '26
you can, but it's just more readable (in my opinon) to write
SELECT * FROM users WHERE id=?;than
select * from users where id=?;is that mostly due to historical baggage? yeah kinda, but it also just doesn't really look like SQL to me unless there's some yelling involved.
13
u/7f0b Jul 21 '26
I prefer a strongly-structured syntax so it is easier to read in the future, which is most important anyway. So going through the trouble of capitalizing what should be, as I go, is worth it. I also always use back ticks around table names, since it makes it easier to search by table name inside mixed codebases.
→ More replies (2)8
u/OldSchoolSpyMain Jul 22 '26
Yup. People don’t realize that putting the reserved words in upper case eases the cognitive load on the brain when reading the scripts for comprehension.
Same goes for new lines and tabs.
Using all three techniques renders SQL very easy to read, comprehend, update, and debug.
→ More replies (1)→ More replies (1)7
u/ILoveRawChicken Jul 22 '26
Yeah I get embarrassed passing ugly queries to other people. When I first began I just wrote everything lowercase until a coworker said “you live like this?” when sharing something in Snowflake. I still get embarrassed thinking about that lol. (He was a good friend though)
→ More replies (1)31
u/Demostes Jul 21 '26
Not true actually, machines can hear plain SQL. U need to shout at them!
29
u/h3lium-balloon Jul 21 '26
It’s been proven all caps SQL is 20% faster bc the machine knows you mean business.
12
u/Horror-Vanilla-4895 Jul 21 '26
I type in lowercase because I’m too lazy to caps lock.
→ More replies (1)3
48
10
u/Meli_Melo_ Jul 21 '26
Lowercase SQL is like 2 spaces indentations, you CAN do it but everyone will hate you for it
4
u/flukus Jul 22 '26
is like 2 spaces indentations,
You mean there's a simple solution (tabs) that would keep everyone happy?
→ More replies (1)→ More replies (1)8
u/FeliusSeptimus Jul 21 '26
If someone reads my SQL and hates me for the indention and casing rather than whatever other weird shit I discovered you could do with it, I'm considering that a solid win.
→ More replies (2)4
u/StarSchemer Jul 21 '26
no ones forcing you to shout them at the screen
They ought to be.
How will a theoretical new developer in the future ever be able to distinguish between key words and database objects at first glance if strict formatting guidelines aren't religiously followed?
3
4
3
3
3
u/EndIsrael Jul 21 '26
Sometimes I do lowercase, it really depends on the vibe I'm getting from that specific query.
2
2
2
2
2
2
2
→ More replies (34)2
u/Confident_Office4875 Jul 21 '26
I did a „hacking“ course in my studies and did everything upper case, I was so annoyed to find out you didn‘t need that
112
65
u/ButWhatIfPotato Jul 21 '26
You have to, how else will the database know that you are angry and are about to unleash the fucking fury?
11
380
u/blaues_axolotl
Jul 21 '26
•
i actually write it in lowercase
280
u/J7mbo Jul 21 '26
MONSTER
144
51
u/Thriven Jul 21 '26 edited Jul 21 '26
The biggest monster I ever worked with would have these queries with absolutely 0 formatting and would only carriage return when he hit the end of his monitor. He'd have subquery inside subquery like it was a nested function and vlookup.
He wrote hot trash queries. One day when he went into a meeting and left his computer unlocked I barely scrolled in on his query window in SSMS so every query was cut off so he'd have to scroll right/left to read it all and he was too dumb to know he was zoomed in or that shift scroll wheel was to scroll horizontal.
He started rewriting procedures and commiting them to production to match his new zoom level. I had a database trigger stopping people from updating procedures unless the database was in a certain mode to prevent people with way too much access to change procedures.
He lost his damn mind over the database trigger I added. I don't think he ever figured out about the zoom. One day I set it back to what it was originally and he gave up rewriting them back to their original format. He exploded at me and didn't come back for like 2 weeks
That was the first of two people who got violent at the workplace at that job with me.
→ More replies (3)19
37
u/Nvrnight Jul 21 '26 edited Jul 21 '26
Same, I don't understand why anyone would choose to do upper case. I am of course a believer in "you do whatever the code base currently does", but if it's a brand new project, the standard is lower-case for me. It's not 1990 anymore, our code editors display the keywords colorized.
12
u/wrecklord0 Jul 21 '26
MY HEARING ISN'T WHAT IT USED TO BE, I CAN'T HEAR MY INNER VOICE WHEN THE CODE IS WRITTEN IN WHISPERS
10
26
u/NoThatsNotPasta Jul 21 '26 •
![]()
Me too. I ain't got time for caps lock. I got shit to do, places to go and, people to annoy.
12
19
6
12
4
3
3
3
2
2
2
→ More replies (4)8
u/Thriven Jul 21 '26
I'm up voting you because people need to hate you more.
Seriously though KEYWORDS need to be upper case and columns lower case. I prefer snake case.
Makes everything more readable.
8
→ More replies (4)8
u/BufferUnderpants Jul 21 '26
i CAN'T SEE WHY capitalizing syntactical elements WOULD MAKE the code MORE readable.
There's syntax highlighting for a reason, and the SQL grammar makes it easy to tell what's a table, column or function anyway.
→ More replies (5)
91
u/OGxPePe Jul 21 '26
Im a lowercase guy. Why did the ever start with CAPS?
148
u/zefciu Jul 21 '26
Because SQL predates the ubiquity of syntax highlighting. This usage of caps (also seen in e.g. COBOL) gives some visual hints about syntax even on monochrome.
→ More replies (1)41
u/OGxPePe Jul 21 '26
So my using SQL on the daily is like using ancient magic?
35
u/PerpetuallyDistracte Jul 21 '26
Yeah! Each time you use SQL you're going back to the 1970s, it's that old!
60
u/Robertos1235 Jul 21 '26
I'm a mixed guy. I write like this. It's fun.
SeLeCt idUser aS id, username As name fRoM User WhErE username lIkE CoNcAt('%', ?, '%') lImIt 1045
6
→ More replies (5)9
2
61
u/AlwaysHopelesslyLost Jul 21 '26
I just use Shift. It doesn't cost me anything extra and it makes switching from keywords to columns easier
38
u/taybul Jul 21 '26
Holding shift for caps while typing to me is like grinding a rail on a skateboard.
→ More replies (1)21
u/cantgrowneckbeardAMA Jul 21 '26
Meaning it's cool that I can do it but my wife is unimpressed?
→ More replies (1)3
u/FujiKeynote Jul 21 '26
Guilty of the same. My caps lock is remapped to Esc... Muscle memory runs deep at this point, I've considered mapping LShift+RShift to caps lock but that's diminishing returns and I still end up holding down shift if I don't catch myself. Autocomplete helps though
→ More replies (2)3
u/Proglamer Jul 21 '26
Some tools like DBeaver can auto-allcap keywords but keep the case of names. Super convenient!
3
u/WillOCarrick Jul 21 '26
I have met people who used caps lock to capitalize the first letter instead of shift.
Yeah, that. It was absurd.
2
u/Sarke1 Jul 21 '26
<Khassaki> HI EVERYBODY!!!!!!!!!! <Judge-Mental> try pressing the the Caps Lock key <Khassaki> O THANKS!!! ITS SO MUCH EASIER TO WRITE NOW!!!!!!! <Judge-Mental> fuck me
→ More replies (1)2
u/AdamWayne04 Jul 21 '26
I stopped doing this when I started using right shift for the left-side captials. Game changer for your pinky. Aaaand you just go back to caps lock for the sake of efficiency lol
12
u/BoldFace7 Jul 21 '26
I feel the same way writing in FORTRAN.
ETA: In FORTRAN 77 at least, the F90 code bases I've worked in have had much better inside voices.
→ More replies (2)
11
u/halawani98 Jul 21 '26
What about keywords in caps but column/table/constraint names in lowercase?
I do this because it makes it easier to read scripts
→ More replies (1)
10
u/leandroman Jul 21 '26
Only the reserved words my friend. My little shift pinky has its own zip code of muscles.
7
6
6
u/MiseryEnthusiast Jul 21 '26
All my sql is in lower case in protest. It also makes it easy to tell when someone has messed with my shit.
2
6
5
4
u/EK077r Jul 21 '26
Imagine not rebinding caps lock to esc
→ More replies (1)2
u/b_call Jul 21 '26
You're the second comment to say this. Why would you do that? Granted, I use a 58 key split keyboard that doesn't even have a caps lock key (technically I have it set to upper layer + Lshift, but I never use it) but why esc? You have a perfectly good one right there in the corner.
4
u/EK077r Jul 22 '26
Because i use esc all the time, but i have no use for caps since you have shift. And the real esc is placed too far away
3
u/Ballbag94 Jul 21 '26
Never caps lock, always shift. Caps lock is almost as weird as writing the prowords in lowercase
3
3
u/Wrathzog Jul 21 '26
When I'm writing sql, I hold the shift key down the entire time like god intended
3
u/OoohManny Jul 21 '26
Can't imagine writing a long and complex procedure in lowercase.. sounds like a nightmare to read 😱
→ More replies (1)
3
3
3
3
3
u/tomthedj Jul 21 '26
naw lowercase so the db knows that when you start doing upper case, shit is about to go down
3
3
3
3
u/Global-Tune5539 Jul 22 '26
And then there are lazy people like me who write everything in lowercase letters.
2
2
u/oompaloompa465 Jul 21 '26
think about it...
ai takeover came before having sql decent autoformatting syntax and indentation
2
2
2
u/fwork Jul 21 '26
when I did my comp sci degree, my teacher wouldn't use capslock, he'd use shift. and if he got distracted while typing an SQL query, he'd keep holding it down.
after 10 seconds or whatever, stickykeys would turn on, and the locked down computers we had in all the classrooms wouldn't let you turn it back off. So he had to reboot.
This happened multiple times per class period some days
2
2
u/nellbones Jul 21 '26
CAPS LOCK, ITS CRUISE CONTROL FOR COOL
but with cruise control you still have to steer
2
2
2
u/ZeppelinJ0 Jul 21 '26
Sounds like y'all just write some gnarly SQL. At least use SQLFluff you neanderthals
2
2
u/mixxituk Jul 21 '26
Yoo have to scream because it's a roller coaster ride till you finish the WHERE which for some dumb reasons is at the end 😭😭
2
2
2
u/a-r-c Jul 21 '26
https://store.steampowered.com/app/3950130/Database_Detective_Minor_Crimes_Division/
someone made an sql query game lol
2
u/JWils411 Jul 22 '26
After decades of writing SQL queries without ever using CAPS, I'll never understand the appeal of shouting through the keyboard.
2
2
2
2
u/GravyPainter Jul 22 '26
I always use all lowercase. IDEs are smart these days. If I see a query using all caps i immediately think its an extract out of MS Access
2
2
u/MulfordnSons Jul 22 '26
I had a coworker who wrote SQL in lowercase and we didn’t really talk to him after that
2
u/philippefutureboy Jul 22 '26
I let the formatter do the capitalization for me 😎
2
2
2
2
2
u/PilsnerDk Jul 22 '26
I write in lower case and my RedGate plug in for SSMS corrects everything anyway.
2
u/ouralarmclock Jul 22 '26
Keywords in caps, everything else lowercase. Except “as” for some reason I also write that in lowercase.
2
2
u/Professional_Noob998 Jul 22 '26
Some psychopaths hold shift to write in SQL
(I might be one of them)
2
u/Independent_Art_952 Jul 22 '26
This meme again in big 2026?! 🥀 Been seeing this meme from college and that's been 7 years already now.
2
2
u/zestful_villain Jul 22 '26
Non programmer here but have to use mysql at work. Why are the command in caps? Any particular reason for this? I feel im angrily ordering my computer to do something. I kinda feel like im threatening the pc with a beating if it does not SELECT a certain colum FROM a database.
2
2
u/Vulpes-Deputa8735 Jul 22 '26
The only way to get pinky biceps is to hold down shift
→ More replies (1)
2
2
u/singletWarrior Jul 22 '26
I did Lower case for temp solutions and upper case for final draft so I can eyeball our release discipline
2
u/NorthernCobraChicken Jul 22 '26
I don't trust people who write SQL queries where the SQL keywords aren't capitalized like the good lord intended.
select count(login_attempts) as attempts from login_attempts where .... just FEELS icky.
SELECT COUNT(login_attempts) AS attempts FROM login_attempts WHERE .... Yeah. That's the good shit.
2
2
u/SignificantSite4588 Jul 21 '26
Pre llm it was true . And it’s proving true now too . When your team has a guy that can write complex SPs . Even better a guy that can understand someone else’s 2k lines of SP and modify it successfully . That guy was a god . No team would let go of that asset .







945
u/EncryptedPlays Jul 21 '26
then there's goofy lil me who holds shift the entire time