I have a table – customers_old . I want to copy all the data from this table, so I will use mysqldump.
I need to restore data into a table , customers_new, which has column names different from customers_old table.
How do I do this?
INSERT..SELECT is only for manually copying each row?
Kindly advise
Thanks
You can do it with a simple ctas (Create Table AS) operation:
By aliasing your old columns you can change the column names in the new table.
see: http://dev.mysql.com/doc/refman/5.5/en/create-table-select.html