--将b表与a表中不相同的记录从a表中删除
delete from a
WHERE not exists (SELECT b.item_id,b.item_type_id FROM b
WHERE a.item_id =b.item_id and a.item_type_id =b.item_type_id and a.acc_id=b.acc_id )
--将b表与a表中不相同的记录插入a表中
insert into a select * from b
WHERE not exists (SELECT a.item_id,a.item_type_id FROM a
WHERE a.item_id =b.item_id and a.item_type_id =b.item_type_id and a.acc_id=b.acc_id )