日期:2014-05-18  浏览次数:20473 次

请大家看一下这段创建存储过程的语句哪里出了问题。在线求解。
create   PROC   C_sum(@N   int)
as  
begin
        return   (1+@N)*@N/2
end
declare   @x1   int
set   @x1=0
exec   C_sum   10,@x1   output
print   @x1

----------------
无法在   sysdepends   中添加当前存储过程所对应的行,因为缺少该存储过程所依赖的对象   'C_sum '。仍将创建该存储过程。


------解决方案--------------------
--try

create PROC C_sum(@N int,@m money output)
as
begin

set @m= (1+@N)*@N/2.0
end
go

declare @x1 money
exec C_sum 10,@x1 output
select @x1

drop proc C_sum