日期:2014-05-17  浏览次数:20682 次

如何更新子表
表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 B
set g='test'
where (d,e) in 
(select a,b from A where A.c='1');