create procedure p_test
@ID int,
@Name varchar(50),
@Out1 int output,
@Out2 varchar(50) output
AS
BEGIN
set @Out1 = @ID
set @Out2 = @Name
END
------------------------------------------
调用
declare @a int
declare @b varchar(50)
exec p_test 1,'2',@a output,@b output
select @a,@b
看结果没环境 硬敲上去的,自己试试吧 |