开发者

How to declare output in sql 2008

开发者 https://www.devze.com 2023-01-19 12:49 出处:网络
@TotalRows int开发者_运维知识库 = NULL Output this won\'t workDepends what you\'re doing with it. You don\'t need to specify a default value for an output parameter - although your client app might t

@TotalRows int开发者_运维知识库 = NULL Output

this won't work


Depends what you're doing with it. You don't need to specify a default value for an output parameter - although your client app might think it needs to supply a value. This will work:

create proc DoSomethingWithRows
    @TotalRows int = null output
as

set @TotalRows = 32 /*You might want to do something more imaginative than this*/
0

精彩评论

暂无评论...
验证码 换一张
取 消