insert into database..tb
select * from datebase1..tb
===================
错误提示.
Cannot insert duplicate key row in object 'tb' with unique index 'tb_1'.
The statement has been terminated.不能删除tb_1
select * from datebase1..tb
===================
错误提示.
Cannot insert duplicate key row in object 'tb' with unique index 'tb_1'.
The statement has been terminated.不能删除tb_1
select tb_1涉及的字段名1,tb_1涉及的字段名2...,其他字段,...
from datebase1..tb a
where PK=(select min(PK) from datebase1..tb where tb_1涉及的字段名1=a.tb_1涉及的字段名1 and tb_1涉及的字段名2=a.tb_1涉及的字段名2 ...)
and not exists (
select 1 from database..tb where tb_1涉及的字段名1=a.tb_1涉及的字段名1 and tb_1涉及的字段名2=a.tb_1涉及的字段名2 ...)
select ss.* from datebase1..tb ss left join database..tb tt where tt.id(任意字段) is null
估计楼主是这样的表间重复,而不是一个表内部重复,试试看吧