Hiroshi Inoue wrote :
[ ... ]
> Column order isn't essential in rdbms.
<Nitpicking>
A relation (a table) is a subset of the Cartesain cross-product of the
definition domains of the attributes (columns). Cartesian product being
a commutative operation, "order of columns" does not really exists. Period.
If you impose an order relationship, you *add* inforation to the
structure. That may be OK, but you can't rely on relational algebra to
guarantee your results. You'll have to manage it yourself. (And, yes,
there is relevant algebra for this, too ...).
</Nitpicking>
> Isn't it well known that it's not preferable to use
> 'select *','insert' without column list etc.. in production
> applications ?
100% agreed. Such a notation is an abbreviation. Handy, but dangerous.
IMHO, such checking can (should ?) be done by an algorithm checking for
column *names* before sending the "insert" command.
A partial workaround : inserting in a view containing only the relevant
columns, in a suitable (and known) order.
[ Back to lurking ... ]