sq连表更新

it2022-05-09  60

示例

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

相关资源:数据结构—成绩单生成器

最新回复(0)