Simple query:Misleading messages on row counts affected

  • I am running a simple update query as follows:

    UPDATE WTABLE SET CaseSel=0 WHERE TablDKey=5281.

    The TablDkey column is an identity column that is also the clustering index. So, this query updates one row. However, I receive two SQL messages. As follows:

    (61 row(s) affected)

    (1 row(s) affected)

    If I run this same query using SQL 2000, I only get the second message.

    Why is this?

  • I am not really sure but are there even 61 records in the table/page. Is it possible you have a trigger or something under the table running you do not see?

  • Nice call. The trigger explains it all. When I update the single row in WTABLE, a trigger then updates 61 rows in another table.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply