0 votes
in Sql by
What are transactions and their controls?

1 Answer

0 votes
by

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

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

There are 4 transaction controls such as

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

ROLLBACK: It is used to roll back the transaction. All changes made by the transaction are reverted back and the database remains as before.

SET TRANSACTION: Set the name of the transaction.

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

Related questions

+2 votes
0 votes
asked Jun 15, 2023 in Sql by Robin
+2 votes
0 votes
asked Nov 7, 2021 in Sql by rajeshsharma
...