1.

What is SavePoint? Give an example.

Answer»

A savepoint marks a point that the current transaction can roll back to. Instead of rolling all of its changes back, it can choose to roll back only some of them. For example, suppose you

  • start a transaction.

  • insert 10 rows into a table.

  • set a savepoint.

  • insert another 5 rows.

  • rollback to the savepoint.

  • commit the transaction.

After doing this, the table will contain the first 10 rows you inserted. The other 5 rows will have been deleted by the rollback. A savepoint is just a marker that the current transaction can roll back to.



Discussion

No Comment Found