Back to Course
SQL for Testers

TCL : Commit, Roleback, SavePoint

COMMIT

Permanently saves all changes made in the current transaction, e.g. COMMIT; — after this, the changes cannot be undone with ROLLBACK.

ROLLBACK

Undoes changes made in the current transaction that have not yet been committed, e.g. ROLLBACK; — extremely useful in testing to reset data after a destructive test.

SAVEPOINT

Marks a point within a transaction that you can roll back to without undoing the entire transaction, e.g. SAVEPOINT before_update; ... ROLLBACK TO before_update;

Why Testers Use TCL

Wrapping test data changes in transactions with savepoints lets testers safely experiment with data changes and cleanly revert them afterward, keeping the test environment consistent.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course