r/SQL • u/badboyzpwns • 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 😃
49
Upvotes
View all comments
Show parent comment
1
u/Thlvg May 21 '26
Used one back in '21. Humongous chain of joins within SCD2 tables, then I realize my first table doesn't describe what I need at the granularity I need. So to test the result I added the correct table to the query and joined with a right join.
But I rewrote it before committing. I'm not a heretic.