我在做一個批處理。在我的過程中,我構建了一組插入查詢語句,並將從我的應用程序運行。我不會使用sql事務並且想要跳過引發錯誤的語句。sql server跳過一次插入多行的錯誤
例如:
create table test
(
test varchar(20)
)
insert into test (test) values ('test1'); -- 1 row affected
insert into test (test) values ('test2'); -- 1 row affected
insert into test (test) values ('a' + 333); -- This will throw error while executing and i ---want to skip this
insert into test (test) values ('test4'); -- This should be affected as per my requirement
是否有可能這樣類型的方法?