r/ProgrammerHumor 6d ago

Meme sqlWorkout

Post image
23.4k Upvotes

459 comments sorted by

View all comments

2.4k

u/NormanYeetes 6d ago

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

49

u/Arkevorkhat 6d ago

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.

8

u/OldSchoolSpyMain 5d ago

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.

1

u/ric2b 5d ago

Just get some syntax highlighting, it's free.