Saturday, July 09, 2011

MYSQL - Update one columns data from another table

To copy one columns data to another existing tables column in mysql, it is possible with an update query like this :

UPDATE table1,table2
SET table1.coltocopy=table2.coltocopy

WHERE table1.coltocompare=table2.coltocompare;

No comments: