传入参数,返回数据集、输出参数的存储过程实例
if (object_id('f', 'P') is not null)
drop proc f
go
create proc f
@num int,
@outnum int output
as
select @outnum=count(*) from n where a>@num
select * from n where a>@num
return @outnum
go
--declare @a int,@c int
--exec f 2,@a output
--set @c=100+@a
--select @c as x;