RE: two tables with same field names into one table

2004-04-03 Thread Matt Chatterley
To select the contents of both into one table, you most likely want to use the 'UNION' operator: SELECT * FROM desktops UNION SELECT * FROM laptops If you create the computers table before hand (you can see how you would create either of the others with SHOW CREATE tablename), then you can just

Re: two tables with same field names into one table

2004-04-03 Thread Brad Tilley
Thank you Matt, I am using Mysql 3.23.58 on RH Linux 9... UNION isn't supported on this version. On Saturday 03 April 2004 15:20, Matt Chatterley wrote: To select the contents of both into one table, you most likely want to use the 'UNION' operator: SELECT * FROM desktops UNION SELECT *

Re: two tables with same field names into one table

2004-04-03 Thread Roger Baklund
* Brad Tilley create table computers select * from desktops, laptops where desktops.field_1 = laptops.field_1 ... Thank you Matt, I am using Mysql 3.23.58 on RH Linux 9... UNION isn't supported on this version. You can do it in two steps: CREATE TABLE computers SELECT * FROM

Re: two tables with same field names into one table

2004-04-03 Thread Rhino
There are two ways of handling this, the long way and the short way. The long way is to prefix each ambiguously named column with the full table name, as you have been doing. That *should* have worked for you since that seems to be what you are doing in your example. Or did you literally write