为何得不到输出参数?!在线等待高手指点.
clxxj 2003-08-22 03:10:56 如何输出@id
Create Procedure GetCount
@s nvarchar(50),@ID int output
as
begin
declare @sql nvarchar(1000)
set @sql=N'select @id = count(*) from vproduct where pname like '+@s+''
exec sp_executesql @sql,N'@id int output',@id output
end
GO
declare @aa int
exec getcount 'e',@id=@aa output
select @aa