9 Reasons to Avoid Using SELECT * and 2 Exceptional Cases
· 6 min read
We often see articles warning that using SELECT *
is a bad habit and columns should be explicitly specified in queries, such as in the latest Alibaba Java Coding Guidelines (Taishan Edition) where it is a mandatory rule. However, people only have a vague understanding of the reasons behind avoiding SELECT *
. This article explains 9 reasons to avoid using SELECT *
from two perspectives, and also discusses two reasonable exceptional cases to use SELECT *
.