How to declare output in sql 2008
@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*/
精彩评论