Hi i think

SELECT table1.*, tabla2.* FROM table1, table2


-----Mensaje original-----
De: Mike Mike [mailto:[EMAIL PROTECTED]]
Enviado el: Friday, January 26, 2001 11:05 AM
Para: [EMAIL PROTECTED]
Asunto: Selecting * from 2 tables 


Hello list,
How would you go about selecting * from 2 tables?
I have 2 tables: table_1 and table_2

In table_1 I have the following data.
dog
bird
cat
In table_2 I have:
mouse
rat
hampster
How do I show both tables contents like:
+----------+
|dog       |
|bird      |
|cat       |
|mouse     |
|rat       |
|hampster  |
+----------+
I've tried the following but its not producing what I
need.  
select * from table_1,table_2;
select * from table_1 where ID IN (select ID from
table_2);
select * from table_1 UNION select * from table_2;
Any help would be great
Thanks for your help
  --Mike


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to