SQL Transaction: What is SQL Transaction?

SQL Tutorial

SQL Transaction: What is SQL Transaction?

SQL Transaction can be defined as the sequence task that is performed on databases in a logical manner to gain certain results. Operations performed like Creating, updating, deleting records in the database comes from transactions.

In simple word, we can say that a transaction means a group of SQL queries executed on database records.

There are four controls are available for transaction:

COMMIT:

It is used to save all changes made through the transaction.

ROLLBACK:

It is used to roll back the transaction such as all changes made by the transaction are reverted back and database remains as before.

SET TRANSACTION:

This command will set the name of transaction.

SAVEPOINT:

It is used to set the point from where the transaction is to be rolled back.

Nahidur Rahman Rifath

Passionate Software Engineer, Content Writer, Reader

Leave a Reply

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