请教 2表(多表)update 2个(多个)值 sql怎么写?
2表(多表)update 2个(多个)值 sql怎么写?
其中table1表100多万条数据,table2表30多万条,最多也就是更新table1中的30多万条,其余的不更新
更新1列,可以按下面的写,如果要更新多个值,sql怎么写?
update table1 a
set a.col3 = nvl((select b.col3
from table2 b
where b.col1 = a.col1
and b.col2 = a.col2), a.col3);
update操作怎么优化,能提高执行效率?
谢谢!