You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/databases/mysql/primer-on-sql-transactions/index.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ contributor:
20
20
21
21
## What are SQL Transactions?
22
22
23
-
A SQL *transaction* is a grouping of one or more SQL statements that interact with a database. A transaction in its entirety can *commit* to a database as a single logical unit or *rollback* (undone) as a single logical unit. In SQL, transactions are essential for maintaining database integrity. They are used to preserve integrity when multiple related operations are executed concurrently, or when multiple users interact with a database concurrently.
23
+
A SQL *transaction* is a grouping of one or more SQL statements that interact with a database. A transaction in its entirety can *commit* to a database as a single logical unit or *rollback* (become undone) as a single logical unit. In SQL, transactions are essential for maintaining database integrity. They are used to preserve integrity when multiple related operations are executed concurrently, or when multiple users interact with a database concurrently.
24
24
25
25
## In this Guide
26
26
@@ -87,7 +87,7 @@ Alternatively, you can also use the below command. The following command can als
87
87
88
88
## Roll Back Transaction Syntax
89
89
90
-
If a database application determines that something in a change in a transaction has failed, the application can use the `ROLLBACK` statement. This statement can effectively de-commit any statements that have already been executed since the beginning of the transaction. In SQL Server and MySQL, the following command is used to roll back a transaction:
90
+
If a database application determines that a change in a transaction has failed, the application can use the `ROLLBACK` statement. This statement can effectively de-commit any statements that have already been executed since the beginning of the transaction. In SQL Server and MySQL, the following command is used to roll back a transaction:
91
91
92
92
ROLLBACK;
93
93
@@ -111,7 +111,7 @@ The following examples demonstrate different ways to use SQL transactions from t
111
111
112
112
### Example 1: Commit a Transaction
113
113
114
-
The example below obtains the largest `CourseId` value from table `Course` and adds `1` to it. It then inserts a row into the `Course` table and commits the transaction. Before Commit, if any part of the `CourseAdd` transaction fails to execute, then none of the transactions can be processed. That means if the `Select` or `Insert` statement fails in some capacity, the entire transaction is null and void.
114
+
The example below obtains the largest `CourseId` value from table `Course` and adds `1` to it. It then inserts a row into the `Course` table and commits the transaction. Before committing, if any part of the `CourseAdd` transaction fails to execute, then none of the transactions can be processed. That means if the `Select` or `Insert` statement fails in some capacity, the entire transaction is null and void.
0 commit comments