I have heard that
Choose * is usually bad practice to make use of when writing SQL instructions since it is more effective to
Choose posts you particularly need.
If I have to
Choose every column inside a table, must i use
Choose * or
Choose column1, colum2, column3, etc.
Does the efficiency really matter within this situation? I'd think
Choose * could be more optimal internally if you actually need all the data, but I only say this without any real knowledge of databases.
I am curious to be aware what the very best practice is within this situation.
UPDATE: I most likely should specify the only situation where I'd really want to perform a
Choose * happens when I am choosing data in one table where I understand all posts will invariably have to be retrieved, even if new posts are added.
Because of the reactions I have seen however, this still appears like an awful idea and
Choose * will not be used for much more technical reasons which i ever though about.
One reason why choosing specific posts is much better is it boosts the probability that SQL Server can access the information from indexes instead of querying the table data. Here is a publish I authored about this: http://sites.asp.internet/jgalloway/archive/2007/07/18/the-real-reason-choose-queries-are-bad-index-coverage.aspx
It is also less fragile to alter, since any code that consumes the information will be receiving exactly the same data structure no matter changes you are making towards the table schema later on.