I know there was a lot of talk about columns names a while back and i
don't want to start it all up again, but i have noticed some things in
the 3.2.2 release that seem a little odd to me.

if i write a query as follows:

select a.id, b.stuff
from a inner join b on a.id=b.id;

The column names come back as i expected they would: id, stuff.

If however, i create the following view:

create view aview as
select a.id, b.stuff
from a inner join b on a.id=b.id;

The column names don't come back as i expected they would instead they
are: a.id, b.stuff. I would have expected that to return the same
thing as the query. Obviously not a big deal to work around.. but
thought it was odd.

The same sort of thing happens on an in-line view or subselect. Take
the fictitious example below:

select a.id, tmpb.stuff
from a inner join
(
     select b.id, b.stuff
    from b
) as tmpb
on tmpb.id=a.id;

The work-around for this is of course to explicitly alias your columns
to the names you were expecting, but it is probably worth changeing if
only to make it more intuitive and consistent.

thanks
--preston

Reply via email to