日期:2014-05-18 浏览次数:20624 次
update a set aid=b.bid from a join b on a.aid=b.bid ------解决方案--------------------
--仅以aid为例 insert into a(aid) select bid from b where not exists (select 1 from a where a.aid = b.bid) --其他两个字段楼主看情况加,或者和相应表做关联添加吧!