0
거래 사용과 관련하여 질문이 있습니다. 다음 코드를 고려하십시오.거래 시작 ... 거래 완료 문제
declare @trans_name varchar(max) = 'Append'
begin tran @trans_name
insert into SIDB_Module
(module_name, module_description, modulelevel, parentid, issystem, iscurrent)
values
(@module_name, @module_description, @modulelevel, @parentid, @issystem, 1)
set @moduleid = SCOPE_IDENTITY()
declare @id int = OBJECT_ID('SIDB_Module')
exec usp_M_SIDB_TransactionInformation_App_Append
@moduleid, id, 'append' ,@createdby_userid
if @@ERROR <> 0
rollback tran @trans_name
commit tran @trans_name
트랜잭션이 여전히 적용됩니다. 심지어 다음 삽입 쿼리가 다른 저장 프로 시저에 있습니까?