On Thu, 12 Feb 2004, Martijn Tonies wrote:
> > SELECT
> > person.*,place.* as home_*
> > FROM
> > person,place
> > WHERE
> > person.home_id = place.id
> > AND
> > name = 'Joe'
>
> What if more of your tables have a column "name"?
then:
person.*,place.* as home_*,thing.* as thing_* (etc...)
> SELECT
> person.*,place.* as home_*
> FROM
> person,place
> WHERE
> person.home_id = place.id
> AND
> name = 'Joe'
What if more of your tables have a column "name"?
> To get back results like:
> id,name,age,home_id,home_name,home_zip_code
>
> The problem is that I don't want to have to up
Say I have two tables, and they have several column names that are the same
in both tables. I know I can manually alias the column names so that they
don't overlap, but is there a way to prefix *all* of the columns of one
table so that I can be sure the names don't overlap?
So if I have these two