hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    Which of the following SQL command can be rolled back?
    Question



    Which of the following SQL command can be rolled back?

    A.

    SELECT

    B.

    COMMIT

    C.

    DELETE

    D.

    CREATE

    E.

    ALTER

    Correct option is C

    The DELETE command in SQL can be rolled back because it is a part of a transaction that affects the data in a table. Before committing the transaction, a rollback can restore the data to its previous state. On the other hand, commands like COMMIT and DDL (Data Definition Language) commands, such as CREATE and ALTER, cannot be rolled back once executed.
    Important Key Points:
    1. DELETE Command:
    · Allows rollback as it doesn’t modify the table structure but only deletes data within a transaction.
    · Often used with WHERE clauses for conditional deletions.
    2. COMMIT Command:
    · Finalizes all changes in a transaction, making them permanent and non-reversible.
    3. DDL Commands:
    · Commands like CREATE and ALTER modify the database structure and are auto-committed, so they cannot be rolled back.
    4. SELECT Command:
    · Doesn’t alter data or structure, so rollback doesn’t apply.
    Knowledge Booster:
    · Difference between DELETE and TRUNCATE:
    · DELETE can be rolled back; TRUNCATE cannot.
    · TRUNCATE is faster and resets identity values.
    · ROLLBACK: Used to undo transactions that are not yet committed.
    · SAVEPOINT: Helps roll back a portion of a transaction by marking points within it.

    Free Tests

    Free
    Must Attempt
    Video Solutions

    RBI Assistant Pre 2026 Full Mock Test -01

    languageIcon English
    • pdpQsnIcon100 Questions
    • pdpsheetsIcon100 Marks
    • timerIcon60 Mins
    languageIcon English
    Free
    Must Attempt
    Video Solutions

    RBI Asst Prelims 2026 : Reasoning Section Test 01

    languageIcon English
    • pdpQsnIcon35 Questions
    • pdpsheetsIcon35 Marks
    • timerIcon20 Mins
    languageIcon English
    Free
    Must Attempt
    Video Solutions

    RBI Asst Prelims 2026 : Quant Section Test 01

    languageIcon English
    • pdpQsnIcon35 Questions
    • pdpsheetsIcon35 Marks
    • timerIcon20 Mins
    languageIcon English
    TEST PRIME

    Access ‘IBPS SO IT Officer’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    1 month
    students-icon
    368k+ students have already unlocked exclusive benefits with Test Prime!
    TEST PRIME

    Access ‘IBPS SO IT Officer’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    1 month
    students-icon
    368k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow