日期:2014-05-16  浏览次数:20423 次

执行带有输出的procedure

ALTER PROCEDURE [dbo].[copy_student]?

?@id int,@name varchar(50) output


AS


select @name=name from student
where id=@id

?

?

执行格式:

declare @name varchar(50)
exec copy_student @id='2',@name=@name output
select @name