We know that in production code
SELECT * is bad.
However, I will often write
SELECT * in my SQL answers when
- The OP failed to include their SQL (so I've got nothing to copy and paste)
- The OP's question is really answered with the
- There's no syntax in my answer like
SELECT *can easily conflict with. [A]
Recently someone thought an answer of mine would be improved if I removed the
Obviously, I think it is acceptable to answer with
SELECT * but I can't say why.
[A] I'm pretending that MySQL and its treatment of GROUP BY don't exist