Retrive Data after Delete or Update Row of Table.

  • Is it Possible?

  • Unless the delete/update in question was running within a transaction, no. Restore from backup.

    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
  • At the point of a delete or insert, you do have access to the deleted & inserted temporary tables that will allow you to see what was deleted or inserted, exactly at that point. You can load those into other locations for later use.

    With SQL Server 2008 you can also look to Change Data Capture to see what has been modified or created within a table.

    Other than that, it's exactly as Gail said.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey (6/9/2010)


    At the point of a delete or insert, you do have access to the deleted & inserted temporary tables that will allow you to see what was deleted or inserted, exactly at that point. You can load those into other locations for later use.

    Specifically that's within a trigger or the OUTPUT clause of the insert/update/delete.

    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
  • GilaMonster (6/9/2010)


    Grant Fritchey (6/9/2010)


    At the point of a delete or insert, you do have access to the deleted & inserted temporary tables that will allow you to see what was deleted or inserted, exactly at that point. You can load those into other locations for later use.

    Specifically that's within a trigger or the OUTPUT clause of the insert/update/delete.

    Right. Sorry I wasn't clear on that.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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