MySQL Transaction

MySQL in version 5.6 supports local transactions means within a given client session through statements such as SET autocommit, START TRANSACTION, COMMIT, and ROLLBACK.

Syntax of START TRANSACTION, COMMIT, and ROLLBACK:

START TRANSACTION
transaction_characteristic [, transaction_characteristic] …]
transaction_characteristic:
WITH CONSISTENT SNAPSHOT
| READ WRITE
| READ ONLY
BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
SET autocommit = {0 | 1}

Each statement provide in syntax control over the use of transactions:
The START TRANSACTION or BEGIN statement begins a new transaction.
COMMIT commits the current transaction, making its changes permanent.
ROLLBACK rolls back the current transaction, cancelling its changes.
The SETautocommit statement disables or enables the default autocommit mode for the current session.
By default, MySQL runs with autocommit mode enabled. This means that as soon as a user execute a statement that updates (modifies) a table, MySQL stores the update on disk to make it permanent. The change cannot be rolled back.