r/SQL • • May 20 '26

PostgreSQL What are common SQL red flags?

Hello! interview prepping, here wondering what are some common red flags for wrioting SQL?

Like

LIKE failing to index, not having trasnactions, usign SELECT * instead of specific collums, etc 😃

51 Upvotes

192 comments sorted by

View all comments

Show parent comment

3

u/pilesofbutts May 21 '26

That would.. infuriate me beyond belief. Good grief. I bet the joins are backwards too, lol.

Can you just truncate these people?

3

u/ComicOzzy sqlHippo May 22 '26

All I can do is rewrite everything over time as the opportunities arise. As much as I complain about it, I really get a lot of joy rewriting everything. Maybe it's vanity.

3

u/pilesofbutts May 22 '26

I feel the same way and complain as well. However, I do enjoy doing better optimization and bringing about more elegance.