Order of records in the INSERTED/DELETED tables in a trigger RRS feed

  • Question

  • We have an app that uses triggers for auditing.  Is there a way to know the order that the records were inserted or deleted?  Or maybe a clearer question is....  Can the trigger figure out if it was invoked for a transaction that "inserted and then deleted" a record versus "deleted and then inserted" a record?  The order of these is important to our auding.


    Thursday, November 29, 2007 7:12 PM

All replies

  • There is no guaranteed order, and thus you cannot rely on the behavior you describe above.

    Thursday, November 29, 2007 8:57 PM