update a set field = b.field from a join b on a.id=b.id
--try update tb1 set tb1.name = tb2.name from tb1 inner join tb2 on tb1.id = tb2.id
--更新表1的COL字段. update A set A.col = B.col from 表1 A,表2 B where A.id = B.id
写一个触发器 create trigger tri_update on Atable after update as update Btable set Btable.col=inserted.col from inserted where Btable.primarycol = inserted.primarycol
field = b.field
from a
join b on a.id=b.id
update tb1
set tb1.name = tb2.name
from tb1 inner join tb2 on tb1.id = tb2.id
--更新表1的COL字段.
update A set A.col = B.col from 表1 A,表2 B where A.id = B.id
create trigger tri_update
on Atable after update
as
update Btable
set Btable.col=inserted.col
from inserted
where Btable.primarycol = inserted.primarycol