你可以将几个可确定唯一性的字段设置为主键,就可以保证不重复插入的,
你这句子最好改成判断
if (select count([Url]) from [TempSplider] where Url=@Url)=0
begin
INSERT INTO [TempSplider] ([Url])
values(@Url)
end
insert into tt(字段1, 字段2)
select distinct 数据1, 数据2 from tt
where not exists(SELECT * FROM TABLE WHERE 字段1 = 数据1 and 字段2 = 数据2)