Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy data from one database to another?

I am upgrading a clients app to a newer version, the databases are close but slightly different. I need to figure out a way to transform and copy the data from one table in one database to another table in the new database. Oh geez :(

like image 678
MetaGuru Avatar asked Apr 06 '09 20:04

MetaGuru


1 Answers

INSERT INTO new_db.dbo.TableA
SELECT * FROM old_db.dbo.TableB

If the tables are the same, this is probably the easiest way.

like image 69
Matt Grande Avatar answered Nov 10 '22 00:11

Matt Grande