我有3个存储过程A,B,C A, 应用程序使用所有参数调用A,然后调用A调用B和C
ex
--------------------------------------------
CREATE PROC B
@b int
as
begin tran
do something
commit
-------------------------------------------
CREATE PROC C
@c varchar(50)
as
begin tran
do something
commit
--------------------------------------------
CREATE PROC A
@j int ,
@c varchar(50),
@b int
as
begin tran
exec C @c /*---call procedure C*/
exec B @b /*---call procedure B*/
commit
是影响性能的因为我多次声明同一个变量?但我需要确定C和B两者都正确执行了吗?
答案 0 :(得分:0)
我建议你在transaction object