In transactional SQL, which command makes permanent all data changes made since the start of the current transaction (or since the last commit/rollback)?

Difficulty: Easy

Correct Answer: COMMIT

Explanation:


Introduction / Context:
Transactional control is vital to ensure atomicity, consistency, isolation, and durability (ACID). After issuing DML statements such as INSERT, UPDATE, or DELETE, you must confirm whether to keep or discard those changes. The command that finalizes changes is fundamental across relational databases.


Given Data / Assumptions:

  • You have executed one or more DML statements in a transaction.
  • Autocommit may be off, requiring an explicit action.
  • You want to persist changes permanently.


Concept / Approach:

COMMIT ends the current transaction and makes all its changes durable. If you instead want to undo them, you use ROLLBACK. Non-SQL terms like ZIP or PACK are unrelated to transactional control, and SAVE is not a standard SQL transaction-finalizing keyword (though some tools present a 'save' button that issues COMMIT under the hood).


Step-by-Step Solution:

Review recent DML operations performed within the transaction.Choose to persist the changes → issue COMMIT.Confirm success through affected row counts or subsequent SELECTs.If needed, use ROLLBACK instead to undo.


Verification / Alternative check:

DBMS logs and transaction monitors will show a commit record; after COMMIT, changes survive client disconnects or server restarts (subject to durability mechanisms).


Why Other Options Are Wrong:

SAVE: Not a standard SQL keyword for finalizing transactions.

ZIP/PACK: Refer to compression/maintenance concepts, not SQL transactions.

None: Incorrect because COMMIT is well-defined in SQL.


Common Pitfalls:

Relying on autocommit inadvertently; forgetting to commit leaves changes unpersisted and vulnerable to rollback on session end.


Final Answer:

COMMIT

More Questions from Database Systems

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion