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/techforallseasons May 21 '26
Some of use use alot of schemas, so tables in the same query but are from different schema may have name collisions and sometimes the schema.table.column syntax itself gets too long.
We ALWAYS alias as a rule, even for single table queries, and we use names that are somewhat consistent for the same tables.
This is a made up example, so excuse the poor choices - it is to make the object more obvious: