AUTOCOMMIT
AUTOCOMMIT is a SQL statement in the Transactions category. When enabled (default), each statement is automatically committed. Disable to use explicit transactions. The syntax is SET AUTOCOMMIT = 0/1;. It returns autocommit mode set. A typical example: SET AUTOCOMMIT = 0; -- Disable autocommit UPDATE accounts SET balance = balance - 100 WHERE id = 1; -- Changes are not yet permanent COMMIT; -- Now permanent SET AUTOCOMMIT = 1; -- Re-enable A close relative is BEGIN / START TRANSACTION, which begins a new transaction. Changes made within are invisible to others until COMMIT. A close relative is COMMIT, which saves all changes made in the current transaction permanently. A close relative is ROLLBACK, which undoes all changes made in the current transaction (or to a savepoint). More about this category: Transaction control — BEGIN, COMMIT, ROLLBACK, SAVEPOINT, ACID properties. Related Transactions entries: BEGIN / START TRANSACTION, COMMIT, ROLLBACK, SAVEPOINT, SET TRANSACTION / ISOLATION LEVEL, DEADLOCK, XACT_ABORT, READ ONLY / READ WRITE.