본문 바로가기

DataBase/Ms Sql

try catch문

http://polyphagia.egloos.com/264013

위의 블로그에서 발췌한 내용입니다.


2005이상부터 적용된다.


begin try
begin tran

insert into aaa
values ()

insert into bbb
values ()

commit tran
end try
begin catch
print error_message()
rollback tran
end catch