On Thu, 2009-08-06 at 10:23 -0400, Link McGaughey wrote: > ...aliasing each of the column names, but this becomes a maintenance > issue when you have alter the selected columns every time there is a > change to the table.
Personally, I would work on stabilizing the design. Tables frequently being changed would indicate to me that whoever is designing the tables is not yet sure what to do with them. I'm curious as to just what the maintenance issues are? Normally I would expect to see all SQL statements packaged together somehow, and each SQL statement appears only once. Personally, I use a hash array, version them according to database version. This simplifies changes a bit. > SELECT * > FROM > table1 t1 > JOIN table2 t2 ON (t1.column_id = t2.column_id) > WHERE > ... > In general, using 'select *' is not a good practice. One good reason is that it is a resource hog. It takes a fair amount more resources to do 'select *' rather than just selecting just the needed columns, especially when a small percentage of the columns are actually used. Yes, I know you didn't ask, but thought you would like to know. It's not too hard to test this yourself. I've done so on Oracle, but not on MySQL. And no, I don't care if 'select *' is easier to code. :)
