已有如下两个表
table A
Acol1 | Acol2 | Acol3 | Acol4
table B
Bcol1 | Bcol2 | Bcol3 | Bcol4 | Bcol5
现在想用table B的Bcol4列去更新table A的Acol3列。
一条sql语句搞定:
update table A inner join B on A.Acol4 = B.Bcol2 set A.Acol3 = B.Bcol4 where Acol1=...
已有如下两个表
table A
Acol1 | Acol2 | Acol3 | Acol4
table B
Bcol1 | Bcol2 | Bcol3 | Bcol4 | Bcol5
现在想用table B的Bcol4列去更新table A的Acol3列。
一条sql语句搞定:
update table A inner join B on A.Acol4 = B.Bcol2 set A.Acol3 = B.Bcol4 where Acol1=...