Skip to content

Commit 9d59e66

Browse files
committed
Copy edit
1 parent 06c6f86 commit 9d59e66

File tree

1 file changed

+3
-3
lines changed
  • docs/guides/databases/mysql/primer-on-sql-transactions

1 file changed

+3
-3
lines changed

docs/guides/databases/mysql/primer-on-sql-transactions/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ contributor:
2020

2121
## What are SQL Transactions?
2222

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.
2424

2525
## In this Guide
2626

@@ -87,7 +87,7 @@ Alternatively, you can also use the below command. The following command can als
8787

8888
## Roll Back Transaction Syntax
8989

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:
9191

9292
ROLLBACK;
9393

@@ -111,7 +111,7 @@ The following examples demonstrate different ways to use SQL transactions from t
111111

112112
### Example 1: Commit a Transaction
113113

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.
115115

116116
BEGIN TRANSACTION CourseAdd;
117117

0 commit comments

Comments
 (0)