问题:用一张表的数据更新另外一张表部分字段
解决:
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);
时间: 2024-12-27 23:38:08
问题:用一张表的数据更新另外一张表部分字段
解决:
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);