โ† 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 ACID property ensures concurrent transactions do not interfere with each other?

    Answer: Isolation

    Isolation keeps concurrent transactions from seeing each other's intermediate states.

  2. A non-repeatable read occurs when:

    Answer: A re-read row returns different data due to another committed update

    Non-repeatable reads happen when another transaction modifies and commits a row between two reads.

  3. Which isolation level is the default in many systems like PostgreSQL and Oracle?

    Answer: READ COMMITTED

    READ COMMITTED is the default isolation level in PostgreSQL and Oracle.

  4. Can a SELECT statement be rolled back by ROLLBACK?

    Answer: No, SELECT does not change data

    SELECT reads data and makes no changes, so there is nothing for ROLLBACK to undo.

  5. After ROLLBACK is issued on a transaction with no savepoints, the transaction is:

    Answer: Fully undone and ended

    A plain ROLLBACK undoes all changes and ends the transaction.

  6. Which command would you use to undo only the last few operations while keeping earlier ones in a transaction?

    Answer: ROLLBACK TO SAVEPOINT

    ROLLBACK TO SAVEPOINT undoes changes after a named savepoint while preserving earlier work.

  7. Why is grouping related DML statements into a single transaction important?

    Answer: To ensure all-or-nothing data integrity

    Wrapping related changes in one transaction guarantees they all succeed or all fail together.