IgorMi (6/8/2012)
I don't agree with you.Ensured with a direct try.
You can execute the following code and ensure yourself that the IGNORE_DUP_KEY = ON has done its effect.
create table qotd5
(
col1 int,
col2 char(1) not null,
col3 varchar(20))
set xact_abort on
Begin transaction
insert into qotd5(col1,col2,col3) values(1,'w','some')
insert into qotd5(col1,col2,col3) values(2,'y','or that')
insert into qotd5(col1,col2,col3) values(1,'x','thing')
insert into qotd5(col1,col2,col3) values(3,'z','or what')
Commit transaction
select col2 from qotd5 order by col2
Regards
IgorMi
Yes, but XACT_ABORT is not ON by default. Since it wasn't explicitly set in the question, we have to assume it's OFF.
John