带有输出参数的存储过程
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: 使用带有输出参数的存储过程
-- =============================================
Alter PROCEDURE GetEmpNameOutPut
@ID INT,
@EmpAge int OUTPUT
AS
BEGIN
SELECT @EmpAge = EmpAge
FROM dbo.tbl_Employee
WHERE Id = @ID
print '@EmpAge = '+Convert(Varchar,@EmpAge)
END
GO
-- exec GetEmpNameOutPut'1',''