执行带有输出的procedure
ALTER PROCEDURE [dbo].[copy_student]??@id int,@name varchar(50) output
AS
select @name=name from studentwhere id=@id
?
执行格式:
declare @name varchar(50)exec copy_student @id='2',@name=@name outputselect @name