How to write multiple queries using MySQL Transaction

| Last Updated: | In: 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

Tags: ,


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.


You may also like:

Follow us!

Get Free Access of 400+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW