@@rowcount can be used to verify the success of selected operations : rowcount « System Settings « SQL Server / T-SQL Tutorial






After each Transact-SQL statement, the server sets the value of this variable to the total 
number of records affected by it. 

9>      select 1+2
10>      GO

-----------
          3

(1 rows affected)
1>
2>      if @@rowcount = 0
3>         Print "No rows were copied!"
4> GO
1>








26.27.rowcount
26.27.1.Using the SET ROWCOUNT Option
26.27.2.Updating an end user's expiration date.
26.27.3.adds the account column to the authors table and creates the new bank and brokerage tables.
26.27.4.if @@ROWCOUNT = 0, return
26.27.5.if @@ROWCOUNT > 1, rollback
26.27.6.@@rowcount can be used to verify the success of selected operations
26.27.7.EXEC and @@ROWCOUNT