โ† 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 phenomenon does SERIALIZABLE isolation prevent that REPEATABLE READ may not?

    Answer: Phantom reads

    SERIALIZABLE prevents phantom reads, which can occur under REPEATABLE READ in some systems.

  2. If a session disconnects unexpectedly before COMMIT, what happens to its changes?

    Answer: They are rolled back

    Most databases roll back uncommitted changes when a session ends abnormally.

  3. Which command begins an explicit transaction block in SQL Server?

    Answer: BEGIN TRANSACTION

    BEGIN TRANSACTION (or BEGIN TRAN) explicitly starts a transaction in SQL Server.

  4. What does the standard SQL command START TRANSACTION do?

    Answer: Begins a new transaction block

    START TRANSACTION begins an explicit transaction in ANSI SQL and MySQL.

  5. In MySQL, which setting disables automatic committing of each statement?

    Answer: SET autocommit = 0

    Setting autocommit to 0 requires explicit COMMIT to save changes.

  6. Two transactions waiting on each other's locks indefinitely is called a:

    Answer: Deadlock

    A deadlock occurs when transactions each hold locks the other needs.

  7. When a deadlock is detected, the database typically:

    Answer: Rolls back one transaction as a victim

    The DBMS chooses a victim transaction to roll back, freeing locks for the other.

Transaction Control Language (TCL) Flashcards โ€” SQL Study Cards with Answers