[thelist] Copy Data in MySQL

Fred Jones fredthejonester at gmail.com
Tue May 10 12:35:37 CDT 2011

I have 2 tables in a MySQL DB. Each has three fields (which are relevant):


id is the autoincrement primary key.
fk is a foreign key to another table (both fk's reference the same third table)
datafield is some data

What I want to do is copy datafield from table A to table B, per the
fk field. To be clear, once it's done the value of datafield in A will
match that in B for fk value 1, and again for value 2, 3 etc.

I'm not sure how to do this however...


More information about the thelist mailing list