TABLE 2 Values of @@ROWCOUNT After Different Command Categories
Command Type Effect
DML statement (e.g., UPDATE) @@ROWCOUNT = number of rows affected
Non-DML statement (e.g., IF ) @@ROWCOUNT reset to 0