注册 登录
编程论坛 MySQL论坛

帮我看看这个怎么解决,谢谢了

落日幻影 发布于 2013-10-14 17:23, 2017 次点击
前辈们帮我看看,怎么解决
if exists(select * from sysobjects where name='wwe' and type='p')
drop proc wwe
go
create proc wwe @ID INT,@CD int output, @NM varchar(8) output
as
select @CD= student_code from stident_info where student_id=@ID
select @NM= student_name from stident_info where student_id=@ID
return
go
declare @return_CD int
declare @return_NM VARCHAR(8)
EXEC WWE @ID='119',@RETURN_CD OUTPUT,@RETURN_NM OUTPUT
SELECT @return_CD AS '学号',@return_NM as '姓名'
go

错误提示:必须传递参数个数 2,并以 '@name = value' 的形式传递后续的参数。一旦使用了 '@name = value' 形式之后,所有后续的参数就必须以 '@name = value' 的形式传递。
1 回复
#2
qw11617485792013-12-05 11:08
EXEC WWE @ID='119',@CD OUTPUT,@NM OUTPUT
试试这个

[ 本帖最后由 qw1161748579 于 2013-12-5 11:10 编辑 ]
1