I used this piece of code in my stored procedure in SQL Server:
create procedure proc_name
as
set nocount on
begin transaction
begin try
commit transaction
end try begin catch
rollback transaction
;throw
end catch
go
but today I got acquainted with the instruction "set xact_abort on". Is the following code equivalent to the previous? Are there any differences between the two?
create procedure proc_name
as
set nocount on
set xact_abort on
begin transaction
commit transaction
go
source
share