Tuesday, February 17, 2009

Migrate column from one table to another table

Here is an example on how to migrate column between table:

update fo_tags en, fo_tags_cn cn, fo_tags_cs cs
set
en.name_cn = cn.name, en.name_cs = cs.name,
en.kind_cn = cn.kind, en.kind_cs = cs.kind
where en.id = cn.id and en.id = cs.id