What are savepoints in transaction management?
Savepoints are markers or checkpoints within a transaction that allow for partial rollback. They enable:
1. **Granular Rollback:** Instead of rolling back the entire transaction, changes can be undone up to a specific savepoint.
2. **Error Handling:** Allows transactions to be rolled back to a known state if an error occurs, while retaining changes made before the savepoint.
3. **Transaction Management:** Provides flexibility in managing complex transactions by breaking them into smaller, manageable parts.
Savepoints help improve error recovery and transaction control in complex scenarios.