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 founder of freewebmentor.com and Software developer from New Delhi (India). Follow Prem's development codes on facebook, and make sure you check out freewebmentor.com for the latest in web development related Tips with the complete code.


You may also like:

Follow us!

Get Free Access of 350+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security 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