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.
- What is the difference between execute, executequery, executeupdate?
- What is the difference between Statement and PreparedStatement in jdbc?
- How can we execute stored procedures and functions?
- How to rollback a JDBC transaction?
- Explain JDBC Savepoint.
- What is the use of blob and clob datatypes in JDBC?
- What is Connection Pooling?
- How do you implement connection pooling?
- What is 2 phase commit?
- What are the different types of locking in JDBC?
- What is a “dirty read”?