How to write multiple queries using MySQL Transaction

Prem Tiwari - - Mysql, Oracle


A transaction is a sequential group of database manipulation operations, which is performed as if it were one single work unit.

These statements provide control over use of transactions:

  • START TRANSACTION or
    BEGIN start a new transaction.

  • COMMIT commits the current transaction,
    making its changes permanent.

  • ROLLBACK rolls back the current
    transaction, canceling its changes.

  • SET autocommit disables or enables the
    default autocommit mode for the current session.

mysql_transaction

MySQL transaction example


Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.