/*嵌套存储过程中需要输出来的参数*/
output 就是这个存储过程返回的值 也可以说输出的值
--创建存储过程 求最大值
CREATE PROCEDURE [dbo].[P_Max]
@a int, -- 输入
@b int, -- 输入
@Returnc int output --输出
AS

if (@a>@b)
set @Returnc =@a
else
set @Returnc =@b

-- 调用
declare @Returnc int
exec P_Max 2,3,@Returnc output
select @Returnc

相关文章:

  • 2022-01-30
  • 2021-06-06
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-06
  • 2021-09-27
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案