TABLE1,TABLE2.假设他们中有唯一索引的字段为BH:
//注意提前保存表
SELECT A.* FROM TABLE1 A,TABLE 2 B WHERE A.BH=B.BH INTO TABLE TMP;//重复记录
TMP.FIRST//扫描重复记录
WHILE NOT TMP.EOF() DO
BEGIN
DELETE FROM TABLE1 WHERE TABLE1.BH=TMP.BH//删除
TMP.NEXT;
END;
INSERT TABLE2 SELECT * FROM TABLE1;//追加记录