建立存储过程时提示必须声明变量
我写的存储过程如下:
CREATE PROCEDURE dbo.isreply
@rootid int,@totalusetable nvarchar(8),@countnum smallint output
AS
begin
if @rootid is null return
select distinct @countnum=count(postuserid)
from @totalusetable
where rootid=@rootid
return
end
go
##################################################
问题是,一直提示必须 @totalusetable