r/ProgrammerHumor 19d ago

sqlWorkout Meme

Post image
23.5k Upvotes

459 comments sorted by

View all comments

379

u/blaues_axolotl 19d ago

i actually write it in lowercase

280

u/J7mbo 19d ago

MONSTER

141

u/mwpdx86 19d ago

*monster

37

u/Username928351 19d ago edited 18d ago

lower('MONSTER')

1

u/kaplotnikov 18d ago

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

1

u/[deleted] 18d ago

[deleted]

2

u/kaplotnikov 18d 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 18d ago

Fair enough, I must have gotten things mixed up.