Carl Reynolds <[EMAIL PROTECTED]> said

> (Having said that, I think the best reason to use "SELECT * FROM table"
> is if you know the table definition _is_ likely to change.  That way you
> keep your rewriting of code to a minimum).

Ever tried to install a system that runs over a WAN? Performance improves
quite a lot if you only SELECT the columns your application is using.

Ever tried accessing the columns from a SELECT * statement, on a table which
has had the order of the columns rearranged? (Which is totally fine by me,
BTW)

Ever had SELECT * code go bang when an obsolete column is removed from a
table, eg:

Old customer table:
name varchar(50);
telex varchar(15);
phone varchar(15);

'Fixed' customer table:
name varchar(50);
phone varchar(15);

When your application attempts to access 'phone' based on it's position
(fields[3]) things get ugly.

Also, SELECT customer.*, order.* FROM customer, order ... causes all sorts
of grief if columns get added or removed and positional references to fields
are used.

Kerry's executive summary: SELECT * is a bad thing, *especially* in
Informix-4GL -- less so in Delphi because you can use FieldByName.

> Now sit down and breathe deeply... :) :)

Calm blue Ocean.
Calm blue Ocean.

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to