当前位置: 代码迷 >> Oracle管理 >> 怎么更新子表
  详细解决方案

怎么更新子表

热度:21   发布时间:2016-04-24 05:15:42.0
如何更新子表
表A为父表 字段a,b,c 表B为子表 d,e,f,g
现欲更新表b的g字段,条件为 B.d=A.a and B.e=A.b And A.c='1' 
请问语句该如何写?

------解决方案--------------------
SQL code
update Bset g='test'where (d,e) in (select a,b from A where A.c='1');
  相关解决方案