Transaction Control Language (TCL) Flashcards
7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Transaction Control Language (TCL) flashcards as text
Which TCL command permanently saves all changes made during the current transaction?
Answer: COMMIT
COMMIT makes all changes in the current transaction permanent and visible to other sessions.
What does the ROLLBACK command do?
Answer: Undoes changes since the last COMMIT or SAVEPOINT
ROLLBACK reverses uncommitted changes back to the last commit or a specified savepoint.
Which statement creates a point within a transaction you can later roll back to?
Answer: SAVEPOINT
SAVEPOINT defines a named marker within a transaction for partial rollback.
After ROLLBACK TO SAVEPOINT sp1, what happens to changes made before sp1?
Answer: They remain part of the transaction
Only changes made after the savepoint are undone; earlier changes stay until commit or rollback.
Which TCL command is used to release a savepoint without rolling back?
Answer: RELEASE SAVEPOINT
RELEASE SAVEPOINT removes a savepoint so it can no longer be used as a rollback target.
What is the default transaction behavior in many databases like Oracle for DML statements?
Answer: Changes are uncommitted until COMMIT is issued
In Oracle, DML changes are held in the transaction until an explicit COMMIT (or implicit DDL commit).
Which of these is NOT a TCL command?
Answer: TRUNCATE
TRUNCATE is a DDL command; COMMIT, ROLLBACK, and SAVEPOINT are TCL.