• Dave62 (1/18/2013)


    L' Eomot Inversé (1/18/2013)


    ...

    So either I am missing something, or there's been a change in behaviour between 2008+SP3 and 2008R2+SP3.

    Try this:

    1) Paste code into SSMS query analyzer

    2) Click "Display Estimated Execution Plan" button

    3) Click on the "Messages" tab after the estimated execution plan is displayed

    4) See the message "1 row(s) affected"

    Enjoy!

    Oh, I see, you didn't mean "how many rows are affected by the following code". Unfortunately that's what you asked. Neither were you asking about rows in an estimated execution plan - because of course you have no code in the question that attempts to select from an estimated execution plan - although that's what the question said it was asking about. Oh well, I suppose that if you are sufficiently careless to express your question that badly I should assume that the response quoted above was not a deliberate attempt to take the piss, to insult, to offend. Now that I know what your question was supposed to mean, I can provide the answer you think is correct. But if you want to know how many rows that code affects, which is what you asked, you have to run the code as well as asking for an estimated execution plan, and that will definitely NOT give you "1 rows affected", and it's reasonable for people to assume that what you asked was what you meant to ask - - and perhaps also to expect you to at least try not to appear to be deliberately offensive. (Your last response to bitbucket appears that way to me too.)

    Tom