Home / Blog / Post
Transferring Data Between Tables In Mysql
Added on 05th June 2019 in Snippet

Sometimes you might need to transfer data between two tables, either as an exact clone or only specific columns. I recently tried to do an exact clone by exporting the data as a csv and reimporting but the data was corrupted, so I ended up just using the simpler SQL query method

INSERT INTO new_table (a,b,c,d,e)
SELECT a,b,c,d,e FROM old_table

Hi there, I am christopher shaw, a software developer form South Yorkshire, England.

I love tinkering with all things tech, and opened this website as a web presence for myself and a place to keep my notes and snippets. Hopefully you will find something here to help

Christopher Shaw