CodesJava

Easy learning with example program codes

Explain jdbc Savepoint


A savepoint represents 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 20 rows into a table.
• set a savepoint.
• insert another 10 rows.
• rollback to the savepoint.
• commit the transaction.
After doing this, the table will contain the first 20 rows you inserted. The other 10 rows will have been deleted by the rollback. A savepoint is just a marker that the current transaction can roll back to.

Related topics

Posted in JDBC   


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap