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 * 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 > do one INSERT into the new table, using a select similar to the one above. > > > Thanks, > > Matt > > > -----Original Message----- > From: Brad Tilley [mailto:[EMAIL PROTECTED] > Sent: 03 April 2004 21:00 > To: [EMAIL PROTECTED] > Subject: two tables with same field names into one table > > Hello, > > I am a mysql newbie. Recently, I've been given the task of joining two > tables > within the same DB into one table. Currently, the tables are named > 'desktops' > and 'laptops'... ultimately, I would like one table named 'computers' Both > tables have the exact same fields... they fields even have the same names. > I > > tried this: > > create table computers > select * from desktops, laptops where > desktops.field_1 = laptops.field_1 > ... > ... > ... > > But I got an error about duplicate field names. Any suggestions on how to > do > > this? > > Thanks, > Brad -- Brad Tilley Coordinator of Computer Services 311-D Cassell Coliseum Phone: 540-231-7539 Cell: 540-998-5903 Fax: 540-231-3445 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]