Solution 1: 1列
update student s, city c
set s.city_name = c.name
where s.city_code = c.code;
Solution 2: 多个列
update a, b
set a.title=b.title, a.name=b.name
where a.id=b.id
Solution 3: 子查询
update stud
虽然在loc上PacificRack口碑不太好,还是没有经得住诱惑,上车了,呵呵~简单测试如下,仅供参考:
----------------------------------------------------------------------
Superbench.sh -- https://www.oldking.net/350.html
Mode : Standard Version
用yum安装包有时候会提示
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 128 M RSS (439 MB VSZ)
Started: Fri Aug 28 08:08:31 2015 - 48:25