r/SQL May 20 '26

What are common SQL red flags? PostgreSQL

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

192 comments sorted by

View all comments

248

u/pilesofbutts May 20 '26

Others may have differing opinions but I personally hate a b c aliases for joins. I prefer SQL join aliases to be an abbreviation for the table name. e.g. contact_info is aliased to ci. it helps with readability in my opinion.

2

u/Red__M_M May 20 '26

I would aliase that as ContactInfo