Understanding DML Operations in SQL
Understanding DML Operations in SQL
Committing a transaction makes all changes made by DML statements permanent, erases savepoints, and releases any locks held during the transaction . Rolling back a transaction, on the other hand, undoes all changes made in the transaction or up to a certain savepoint, preserving data before those changes .
Transactions in DML operations ensure that a set of SQL statements are executed as a single unit, meaning they either all execute successfully or none do, maintaining data integrity . Savepoints are important because they allow partial rollbacks within a transaction, providing more control and flexibility by marking specific points to which a transaction can be undone .