Solved - Python: automate input to MySQL query

Joe Riopel goon12 at
Wed Sep 23 20:29:39 CEST 2009

On Wed, Sep 23, 2009 at 10:49 AM, D'Arcy J.M. Cain <darcy at> wrote:
> Of course you can get around this by specifying every field and using
> "AS" to change the names to manager_id and employee_firstname, etc. but
> if you are going to do that anyway, why not just do it once in the
> database instead of littering the code?

In my case, I sometimes generate "entity" classes from automatically
from the database. So, I am not typing them, but the field names on
some of my classes will be longer than they need to be.  Also, I only
have to use the AS when I am doing joins, which I don't do as often as
selects, inserts, and/or updates. So now I would have to type the long
redundant column name for those 3 types of queries, instead of saving
me from typing "AS" in the joins.

More information about the Python-list mailing list