mysql中如何把两个表的数据合并到一个表里
比如现在有两个表 shedata和shenews:itemid都是一样的,需要把title和content合并到一个表里去,比如合并到shedata表里。
搞定了!
update shedata set title = (select title from shenews b where shedata.itemid = b.itemid)
原来是这样写的。
mysql中如何把两个表的数据合并到一个表里
比如现在有两个表 shedata和shenews:itemid都是一样的,需要把title和content合并到一个表里去,比如合并到shedata表里。
搞定了!
update shedata set title = (select title from shenews b where shedata.itemid = b.itemid)
原来是这样写的。