阻止插入一条记录时重复插入
代码
insert into
[Catchpage].[dbo].[gdlmo_yq]([title],[PageUrl])
select 'aaaa','http://10.4.19.252'
where not exists
(select * from [Catchpage].[dbo].[gdlmo_yq] b where b.[PageUrl] = 'http://10.4.19.252')
[Catchpage].[dbo].[gdlmo_yq]([title],[PageUrl])
select 'aaaa','http://10.4.19.252'
where not exists
(select * from [Catchpage].[dbo].[gdlmo_yq] b where b.[PageUrl] = 'http://10.4.19.252')