English 中文(简体)
2005年产出参数
原标题:output parameter SQL Server 2005
  • 时间:2009-08-26 11:40:54
  •  标签:

如何使用程序产生的产出参数?

最佳回答

假设你有生产参数的提料。 你可以把它称作产出价值。

CREATE PROCEDURE AddOne
    @val int,
    @valPlusOne int out

AS
BEGIN
    SET NOCOUNT ON;

    SET @valPlusOne = @val + 1
END
GO

--This is used to store the output
declare @PlusOne int

--This calls the stored procedure setting the output parameter
exec AddOne 1, @valPlusOne=@PlusOne OUT

--This displays the value of the output param
select @Plusone
问题回答

暂无回答




相关问题
热门标签