存储过程默认参数

    技术2022-05-11  129

    create proc test@inta int,@intb int=0asset nocount on begin

     return @inta+@intbend

    --demodeclare @intReturnValue intexec @intReturnValue=test 3select @intReturnValue

    exec @intReturnValue=test 3,2select @intReturnValue

                ----------- 3

    (所影响的行数为 1 行)

                ----------- 5

    (所影响的行数为 1 行)


    最新回复(0)