The Irrational Fear of Lowercase SQL
Description
This image is a screenshot of a conversation on Twitter, initiated by the official account for Supabase (@supabase_io). The first tweet, posted on April 20, 2021, asks the developer community: 'Do you write SQL in uppercase or lowercase? Why do you prefer to do it that way?'. Below it is a reply from a user named 'nooral network' (@kd29598), whose profile picture is an anime character. The reply humorously confesses, 'UPPERCASE, for some reason i am scared of writing SQL in lowercase'. This meme captures a long-standing, semi-serious debate within the programming world. While most SQL databases are case-insensitive regarding keywords, a strong convention exists to write commands like 'SELECT', 'FROM', and 'WHERE' in all caps for readability, to distinguish them from table and column names. The joke lies in the user's dramatic and irrational 'fear' of deviating from this norm, a feeling that resonates with many senior developers who have had this stylistic choice ingrained in them since they first learned the language, making the alternative feel fundamentally wrong
Comments
30Comment deleted
I write my SQL keywords in uppercase for the same reason I use `sudo` - I need the database to know I'm not making a request, I'm issuing a command
I write SQL in ALL CAPS so that when EXPLAIN ANALYZE exposes a seq-scan on the 2 TB table, at least the query is shouting in panic with me
The real fear isn't writing SQL in lowercase - it's explaining to the DBA why your 'select * from users where 1=1' query brought down production because you thought case sensitivity only mattered in the WHERE clause, not in your career trajectory
The fear of lowercase SQL is real - it's like we've been conditioned by decades of O'Reilly books and Stack Overflow answers to believe that `SELECT * FROM users WHERE id = 1` will somehow execute differently than `select * from users where id = 1`. Spoiler: the query optimizer doesn't care about your existential dread over case sensitivity, but your code reviewer with 20 years of Oracle experience absolutely does
I uppercase SQL so I can yell at the database without paging SRE - and to avoid Oracle-to-Postgres migrations that create both Users and users when someone quotes an identifier
UPPERCASE for keywords - lowercase is harmless until someone quotes identifiers; then Oracle folds up, Postgres folds down, and your ORM folds the team
UPPERCASE SQL keywords: the only highlighter that survives a DBA's 20-year-old query dump without mercy-kill
Keywords in lowercase, table/column names in uppercase — that's what I prefer. Comment deleted
select KITTENS from ANIMALS where no this is just wrong Comment deleted
It might look scary but it's actually helpful for reading the queries in case you don't have a syntax highlight. Comment deleted
SQL is scary anyway. I feel like I'm gonna drop the table and not know Comment deleted
Good thing that SQL queries are often used not directly in sources or DBMS workbench, but in a special console where you can't do anything but "select". Comment deleted
or "DROP" Comment deleted
+1 Comment deleted
KITTENS column in ANIMALS table — now this on the other hand is scary 😢 Comment deleted
Yes it's a zoo with animals for columns and enclosures for rows Comment deleted
DROP DATABASE * Comment deleted
for some reasons database works better if you shout at it Comment deleted
Well, that's some serious tech, you convinced me Comment deleted
SELECT ROMEO FROM ART WHERE FORE Comment deleted
lowercase, because it is easy to read Comment deleted
комменчу на русском, я у мамы опасный Comment deleted
english only please! warning 1/3 for @ErinIlya Comment deleted
commenchy na russskom Comment deleted
still not english. don't test me, comrade. warning 2/3 for @ErinIlya Comment deleted
hahaha, "commentator" Comment deleted
asd Comment deleted
👀 Comment deleted
*sad, I assume Comment deleted
Whatever. As long as keywords and names differ. It also depends on what config is used for DBMS. For the DB I used not so long ago writing names in caps was the only option. Comment deleted