日期:2014-05-18 浏览次数:20492 次
delete A from B,A where A.某一字段=B.某一字段 insert into B select * from A where not exists(select 1 from B where 某一字段=A.某一字段)
------解决方案--------------------
--delete B delete B from B,A where A.某一字段=B.某一字段 insert into B select * from A where not exists(select 1 from B where 某一字段=A.某一字段)
------解决方案--------------------
+1
update b set col1=a.col1 .... from a join b on a.关联字段=b.关联字段 insert into b select * from a where not exists(select 1 from b where 关联字段=a.关联字段)