取消你的唯一索引或主键,但这样可能不是你想要的结果, (2)合并时不合并重复的数据 SQL : insert into 1.A() select from 2.A where (2.A.(唯一索引或主键) not in select 1.A.同一字段 from 1.A ) (此法适合一个字段),若多个字段为索引可以用 not (1.A.字段1=2.A.字段1 and ....)
你可以先手工将两个表倒到一个库中(改改表名),然后用SQL去掉重复的项。再合并
select * fromn A into TempA insert into B from TempA where....
(2)合并时不合并重复的数据 SQL : insert into 1.A() select from 2.A where (2.A.(唯一索引或主键) not in select 1.A.同一字段 from 1.A ) (此法适合一个字段),若多个字段为索引可以用
not (1.A.字段1=2.A.字段1 and ....)
insert into B from TempA where....