On Friday, 26. September 2008, Tim Carty wrote: | I would like to combine multiple tables into a single table. I can create a | UNION between tables with similar columns cols A, B, and C from table_1 | with cols A, B, and C from Table_2. What I can¹t figure out is how to add | additionals columns (D, E, F) from table_2 if the columns don¹t exist in | Table_1.
select a, b, c, null as d, null as e, null as f from table_1 union select a, b, c, d, e, f from table_2 should do it. Ciao, Thomas -- Thomas Pundt <[EMAIL PROTECTED]> ---- http://rp-online.de/ ---- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]