Stored Procedure, when to use Output parameter vs Return variable

前端 未结 7 1466
不思量自难忘°
不思量自难忘° 2020-12-28 12:54

When would you use an output parameter vs a return variable, or vice versa? In the following simple example, I can achieve the same thing using either one.

Using out

7条回答
  •  温柔的废话
    2020-12-28 13:20

    This is T-SQL, not C. Never use return values, many client side APIs make dealing with return values a pain if not plain impossible. Always use OUTPUT parameters.

提交回复
热议问题