โ† All SQL Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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).

  7. Which of these is NOT a TCL command?

    Answer: TRUNCATE

    TRUNCATE is a DDL command; COMMIT, ROLLBACK, and SAVEPOINT are TCL.