you can just look at @@ROWCOUNT after you do a statment and it will tell you how many rows were affected by the last SQL statement.
i.e., SELECT @@ROWCOUNT
or better yet, put it into a local variable such as:
Keep in mind that pretty much EVERY SQL statement changes the value of @@ROWCOUNT, so you need to save it off if you have any code that may change it before you return it to your calling procedure.
DECLARE @RowCountToReturn int
SELECT * FROM dbo.MyTable
SET @RowCountToReturn = @@ROWCOUNT
Non est ei similis.
I just read "100 Things To Do Before You Die". I was surprised that "Yell for help!!" wasn't one of them