|
Posted by Petr Vileta on 12/03/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.)
Navigation:
[Reply to this message]
|