need urgent info regarding rollback

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yogeeswar
    New Member
    • Feb 2007
    • 9

    need urgent info regarding rollback

    I need to write a SP to decommission one of the value from all tables.but all the deletions need to be made at a time, if problems occurs at any delete statement all the previously deleted rows need to be ROLLBACK. Is there any way fro this.

    Thanks in advance
  • Herb
    New Member
    • Sep 2006
    • 13

    #2
    Wrap everything in a BEGIN ATOMIC, that will cause the rollback to rollback every thing. Create a SQL EXCEPTION hander and in that do your rollback. any SQL inside the BEGIN ATOMIC will get rolled back

    Comment

    Working...