Prevent duplicate rows using unique index
create table test(id int identity(1,1), name varchar(10))create
insert unique index ix_test on test(name) with IGNORE_DUP_KEY into test(name)values('ppv')select * from test
create table test(id int identity(1,1), name varchar(10))create
insert unique index ix_test on test(name) with IGNORE_DUP_KEY into test(name)values('ppv')select * from test
No comments:
Post a Comment