1、建立
CREATE PROCEDURE mw_jxCh
@rs char(3) output, --输出参数
@classID int --输入参数
AS
declare @tf char(1) --临时参数
--教学大纲
select @tf=count(*) from jx_DGJH where classID=@classID and type='dg'
if @tf>'0'
select @tf='2'
select @rs=@tf+'00'
2、执行
declare @rs char(3)
exec mw_jxch @rs output,@classID=0220002
select @rs
注意:建立、执行过程中,输入参数都要在输入函数前面