Gadfly question
Gerhard Häring
gh at ghaering.de
Tue May 20 20:23:26 EDT 2003
matthew wrote:
> Hi,
>
> I've installed and been playing around quickly with Gadfly. [...] [SELECT * FROM ...]
> ie: Table defined as Name,Phone, FAX, Nickname
> output tuple gives fields as Phone, FAX, Nickname, Name
> Shouldn't they be identical?
Maybe. The lesson you learnt today is to not use SELECT * ;-)
Your SQL will be more maintanable without SELECT *, anyway. It's better
to always name the columns you request explicitly. The reason why I
always recommend this is that if you ever insert an additional column,
your existing code will continue to work. That certain databases return
the columns in a more or less random order is news to me, but only
reinforces my belief that SELECT * is evil.
-- Gerhard
More information about the Python-list
mailing list