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 😃
50
Upvotes
View all comments
Show parent comment
0
u/throw_mob May 21 '26
agree, while i do it sometimes too.. i consider not using aliases a red flag. then using only a ,b ,c is not that bad ,but it is bad, using stuff like customer_information ci or cust etc.. is good compromise. i personally dont like loong aliases
not using cte's or not knowing subquery, both should be somehow showed. maybe non standard group by ( case when x...) window functions etc etc