RT
------解决方案--------------------
求:5
drop proc p10
create proc p10 (@in int, @out int output) as
declare @o1 int
declare @i1 int
if @in <= 1
set @out = 1
else
begin
set @i1 = @in - 1
exec sp_executesql N 'exec p10 @i1, @o1 output ',
N '@i1 int, @o1 int output ',
@i1, @o1 output
set @out = @in * @o1
end
return
declare @o1 int
exec p10 5, @o1 output
select @o1