Why is SELECT *
bad practice? Wouldn\'t it mean less code to change if you added a new column you wanted?
I understand that SELECT COUNT(*)
Selecting with column name raises the probability that database engine can access the data from indexes rather than querying the table data.
SELECT * exposes your system to unexpected performance and functionality changes in the case when your database schema changes because you are going to get any new columns added to the table, even though, your code is not prepared to use or present that new data.