in reply to Module Pondering
The problem is that you want to make errors obvious as early and as explicitly as possible. If the programmer has been explicit about what columns are expected there, then in the future if you rebuild the database, migrate the script, etc you will find out early about any bad assumptions about what columns are present. By contrast if you select *, things may look like they work for a good bit, but expected data is not present (because the columns were changed out from under you). This will likely take longer to debug simply because if (not when) you get an error message, it will not be obviously tied to where the actual broken assumption is.
So be explicit up front and some day it will save you a headache.
|
---|