Hi!
Vittorio ZuccalĂ wrote:
Hello,
i've two tables and they have the same field.
I'd like to make a select which take records in a table and after it
shows record in the other table
Read here: http://dev.mysql.com/doc/refman/5.0/en/union.html
in the same field...
It cannot be "the same", as it belongs to a different table.
In your example, both tables use the same name for one field, but for
"Union" this is not required - all that is needed is that the result
columns of the SELECTs that are combined into the UNION be compatible,
so that a common result type can be set.
I try to explain:
Table1
FieldA - FieldB
AAA123 - Cellular
BBB111 - PostIt
Table2
FieldA - FieldH
AAB111 - Dido
BGF145 - Serp
My select has to show:
AAA123
BBB111
AAB111
BGF145
Is there a way for it?
Try this:
SELECT FieldA FROM Table1 UNION SELECT FieldA FROM Table2
Happy reading!
Joerg
--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Office: (+49 30) 417 01 487 VoIP: [EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]