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?
- A.
INSERT
- B.
UPDATE
- C.
DELETE
- 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.