Reply to Re: Wild card aliases...

Your name:

Reply:


Posted by Petr Vileta on 10/01/94 11:58

Jeff Gardner wrote:
> More specifically, I would like to assign aliases as such: SELECT
> table1.*, table2.* AS alias1.*, alias2.* Many of the fields in the
> two tables being queried have the same name (ie address, phone1,
> etc.). Maybe, in my ignorance, I'm missing the point here. What I
> want to do is reference table1.address and table2.address in my
> output after the query is performed. What I am hoping to avoid is
> creating aliases for every instance of same name fields.
>
If I know it is not possible in MySQL. If you have for example
table1 (partno int(5), string varchar(100))
table2 (mykey int(5), string varchar(200))
and you want to select all from both tables, you must write some like this
select partno,mykey,table1.string,table2.string from table1,table2 where
....

--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация