Multiple "x rows affected" after query has executed

  • Hi All,

    When i execute a simple update statement, updating null values to be 0 (zero) in a single column of a table, i am receiving two seperate "(x rows affected)" statements.

    There are no triggers set up on this table.

    Does anyone have any idea how i can identify what is causing this second operation?

  • Do you have the execution plan on? Normally it would be triggers.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks very much, i did indeed have the "include execution plan" option selected and it was this which was creating the extra output message.

  • GilaMonster (1/7/2011)


    Do you have the execution plan on? Normally it would be triggers.

    Interesting... I didn't know this. I was immediately thinking triggers myself.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

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

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