问题:用一张表的数据更新另外一张表部分字段
解决:
1
2
3
4
5
|
update table1 t1
set (t1.col1, t1.col2) = ( select t2.col1, t2.col2
from table2 t2
where t1. key = t2. key )
where t1. key in ( select key from table2);
|
本文转自stock0991 51CTO博客,原文链接http://blog.51cto.com/qing0991/1774318:,如需转载请自行联系原作者