COMMIT

Description: Concludes a transaction made out of autocommit mode (a series of queries following a BEGIN) and writes changes to the database on disk.

The following commands effectively do a COMMIT by ending a transaction automatically: ALTER TABLE, BEGIN, CREATE INDEX, DROP DATABASE, DROP TABLE, RENAME TABLE, and TRUNCATE.

Limitations: Transaction-safe tables (BDB and InnoDB). With other table types, queries following BEGIN will be committed to the database automatically.

Description in: Day 17

See also: BEGIN, ROLLBACK

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.