两张表A,B
A表里有a,b
B表里有c,d
a和c是主键关联的
我想把b赋值给d
第一种
update B set B.d=(select A.b from A where A.a=B.c and B.d is null)
第二种
update B set B.d=A.b from B left join A on B.c=A.a where B.d is null
两张表A,B
A表里有a,b
B表里有c,d
a和c是主键关联的
我想把b赋值给d
第一种
update B set B.d=(select A.b from A where A.a=B.c and B.d is null)
第二种
update B set B.d=A.b from B left join A on B.c=A.a where B.d is null