O'Reilly logo

Sams Teach Yourself MySQL by Chris Newman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transactions in MySQL

Transactions in MySQL are available only on tables that use the InnoDB or BDB storage engines. See Lesson 14, “Creating and Modifying Tables,” for more information on how to select a specific table handler.

To begin a transaction, issue the BEGIN TRANSACTION command. Any database-manipulation statements issued after that command form part of the same transaction.

Until you issue a statement that ends a transaction, the effects of any commands that you enter are visible only within the current MySQL session. For instance, if you delete rows from a table after issuing the START TRANSACTION command, other database users can still query those rows, even though in your session they appear to be already deleted.

To commit all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required