Mild Fuzz Mild Fuzz - 2 years ago 71
SQL Question

Copy one column from one database to another

I need to copy the content from a column in one database into the matching column in another, so that the same content goes in the record with the same ID. Something like the following pseudo stuff:

SET database2.table1.columnA TO database1.table1.columnA WHERE =

Answer Source

You can use JOIN in an UPDATE statement:

UPDATE table1 t1 
JOIN database1.table1 as t2 ON =
   t1.columnA = t2.columnA
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download