Summary

During this hour, you learned the preliminary concepts of transactional management through the use of three transactional control commands: COMMIT, ROLLBACK, and SAVEPOINT. COMMIT is used to save a transaction to the database. ROLLBACK is used to undo a transaction that was performed. SAVEPOINT is used to break a transaction or transactions into groups, allowing you to roll back to specific logical points in transaction processing.

Remember that you should frequently use the COMMIT and ROLLBACK commands when running large transactional jobs to keep space free in the database. Also keep in mind that these transactional commands are used only with the three DML commands (INSERT, UPDATE, and DELETE.)

Get Sams Teach Yourself SQL in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.