示例
sqlserver:
update a
set a.name
=b.name,a.value
=b.value
from table1 a,table2 b
where b.id
='id2' and a.id
=b.id
Oracle:
update table1 a
set name
=(
select name
from table2 b
where a.no
=b.no)
where
exists(
select name
from table2 b
where a.no
=b.no);
转载于:https://www.cnblogs.com/hongjiang/p/9761292.html
相关资源:数据结构—成绩单生成器
转载请注明原文地址: https://win8.8miu.com/read-1492157.html