Identify the command from the following options that does not require a COMMIT…

2026

Identify the command from the following options that does not require a COMMIT statement to save changes permanently in Python-MySQL connectivity, as it is auto-committed by MySQL?

  1. A.

    INSERT

  2. B.

    UPDATE

  3. C.

    DELETE

  4. D.

    ALTER

Attempted by 453 students.

Show answer & explanation

Correct answer: D

The correct answer is Option D (ALTER).

ALTER is a DDL (Data Definition Language) command, and in MySQL, DDL commands are auto-committed. This means changes made by ALTER are saved automatically without requiring an explicit COMMIT.

On the other hand, INSERT, UPDATE, and DELETE are DML commands and require COMMIT to permanently save changes.

Thus, ALTER does not require a COMMIT.

Explore the full course: Rssb Senior Computer Instructor