数据库 `bbs` 是当前正在用的数据库,一周前转移服务器导入的时候有些文字乱码,但因为有很多新数据,不能恢复到1周前.数据库 `bbs2` 是1周前的数据库.现在想把 bbs 中的表 cdb_posts 以前的数据更新至旧版(主键为 pid),应该怎么写?update `bbs`.cdb_posts as x, `bbs2`.cdb_posts as y
set x.subject=y.subject, x.message=y.message
where x.pid=y.pid and y.pid>0; 这样写有问题吗?