On this page
SET AUTOCOMMIT
Core command
SE AU
Turns autocommit on or off for the current connection.
Syntax
SET AUTOCOMMIT ON|OFF
Arguments
| Argument | Required | Values | Default |
|---|---|---|---|
ON or OFF | Yes | ON commits every statement at once; OFF waits for COMMIT. TRUE and FALSE work too. | None |
Examples
SET AUTOCOMMIT OFF;
SET AUTOCOMMIT ON;
Details
The change applies to the current connection only, for this session: it is not saved, and a new connection starts with its usual setting. The console then shows the new state; when autocommit is on, it warns that updates can no longer be rolled back. Anything other than ON, OFF, TRUE or FALSE, in any case, is refused.
Related
- SHOW AUTOCOMMIT
- Settings, the
Autocommitdefault
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.