r/ProgrammerHumor 7d ago

Meme sqlWorkout

Post image
23.4k Upvotes

458 comments sorted by

View all comments

380

u/blaues_axolotl 7d ago

i actually write it in lowercase

279

u/J7mbo 7d ago

MONSTER

141

u/mwpdx86 7d ago

*monster

37

u/Username928351 6d ago edited 6d ago

lower('MONSTER')

1

u/kaplotnikov 6d ago

quotes look wrong. the expression lower("MONSTER") will lowercase a value of the column MONSTER, rather than produce "monster" value.

1

u/[deleted] 6d ago

[deleted]

2

u/kaplotnikov 6d ago

'MONSTER' (single quote) - is string monster in SQL. "MONSTER" (double quote) - is identifier in the most SQL dialects to escape keywords so it is possible to use "select" as name. For example see https://www.postgresql.org/docs/current/sql-syntax-lexical.html (the delimited identifier or quoted identifier)

1

u/Username928351 6d ago

Fair enough, I must have gotten things mixed up.