Mild Fuzz Mild Fuzz - 6 months ago 13x
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 =


You can use JOIN in an UPDATE statement:

UPDATE table1 t1 
JOIN database1.table1 as t2 ON =
   t1.columnA = t2.columnA