@TotalRows int = NULL Output
this won't work
@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*/