存储过程调用存储过程
有存储过程A和B,我想在A中调用B,并将B中的的某一个OUTPUT类型的参数赋值给A中的某一个OUTPUT类型的参数。该怎么做? 问题点数:50、回复次数:2Top
1 楼hjhing(winding)回复于 2003-01-09 10:13:26 得分 35
create procedure pr1
@a int output
as
declare @t int
exec pr2 @t output
set @a=@t
GO
CREATE procedure pr2
@a int output
as
set @a=10
GO
/*
declare @s int
exec pr1 @s output
print @s
*/
Top
2 楼cenxaoi(毅)回复于 2003-01-09 12:42:14 得分 15
楼上正确
注意 A调用了B B中不要调用A啊 不然进入死迭代,系统最多迭代32次。Top




