• Yes Donald, they do affect the @@rowcount variable. Say for example you have the following trigger on Table1 then you would only receive those Rowcount which may be result of the DMLs written in trigger itself.

    Create trigger abcIns

    on Table1

    for insert

    as

          declare @col1var int

          insert into #temptbl(timeofinsert,idoninsert) values(getdate(), @col1)

    return.

     

    Now whenever any insert is made on Table1 it will return only the rowcount of the insert statement(it may be any DML statement) inside the trigger. This carried to scope of the session in which trigger firing insert statement was issued.

     


    Kindest Regards,

    Avinash

    avin_barnwal@hotmail.com