| − | A transaction may include several SQL statements, but the statements are processed in an all-or-nothing fashion. The transaction represents logical work like a customer purchasing a product. For example, the statements may include adding the purchase price to the customer's account, and subtracting the product from inventory. If either statement is executed, they must both be executed, and if either statement is aborted, they must both be aborted. This is achieved by using the COMMIT statement and the ROLLBACK statement. Once all of the statements to execute for the current transaction have been entered, the COMMIT statement is entered, and the transaction is committed to the database. If any of the statements in the transaction cannot be completed, the entire transaction is rolled back, and none of the statements take effect. | + | A transaction may include several SQL statements, and the sequence of statements are executed [[atomically]]. The transaction represents a logical unit work such as a customer purchasing a product. For example, the statements may include adding the purchase price to the customer's account, and subtracting the product from inventory. If either statement is executed, they must both be executed, and if either statement is aborted, they must both be aborted. This is achieved by using the COMMIT statement and the ROLLBACK statement. Once all of the statements to execute for the current transaction have been entered, the COMMIT statement is entered, and the transaction is committed to the database. If any of the statements in the transaction cannot be completed, the entire transaction is rolled back, and none of the statements take effect. |