YEAH, THAT’S WHY HE PRESSED CAPSLOCK
Comment on Spent half an hour on it. Felt good.
Dave@lemmy.nz 5 weeks agoDo people actually write SQL in all caps? Ever since I was a boy I’ve always written SQL (and HTML) in lower case.
svc@lemmy.frozeninferno.xyz 5 weeks ago
umbraroze@lemmy.world 5 weeks ago
SQL is an Old Language of Ancient Power. You have to write the keywords in all caps.
(Fortran is basically the same, but it’s rarer. Lisp is too, but you don’t need to capitalise everything, as the Ancient Power is contained in the parentheses.)
Hupf@feddit.org 4 weeks ago
SeboBear@discuss.tchncs.de 5 weeks ago
This just made my day 😂
cobysev@lemmy.world 5 weeks ago
They’re both acronyms, so yes? You always write acronyms in upper case.
Structured Query Language (SQL)
HyperText Markup Language (HTML)
Some exceptions to the rule exist, like “Database” is usually abbreviated as Db in acronyms. For instance, IMDb (Internet Movie Database).
Although considering database is a singular word, it makes sense to lower-case the middle letter of the word, as it wouldn’t be capitalized in the spelled-out word anyway.
Dave@lemmy.nz 5 weeks ago
Not sure if joking but I meant the language not the acronym.
cobysev@lemmy.world 5 weeks ago
SQL is the language. Its name is also an acronym, for “Structured Query Language.”
Dave@lemmy.nz 5 weeks ago
More specifically I meant when I am writing in the language.
I don’t write “SELECT * FROM users;”, I write “select * from users;”
LeFrog@discuss.tchncs.de 5 weeks ago
It is more like
SELECT users.id FROM users
or
select users.id from users
PotatoesFall@discuss.tchncs.de 5 weeks ago
I do it because it helps me visually separate SQL keywords from table and column names.
Helps especially when your SQL is embedded in another file so there is no syntax highlighting.
Dave@lemmy.nz 5 weeks ago
That’s a good reason. I guess when I’m directly writing SQL the queries are point in time and not part of some enduring codebase.