A SQL statement that runs successfully is different from a committed transaction.
Executing successfully means that a single statement was:
一个SQL语句成功运行不同于一个提交的事务。
一个单独语句成功执行意味着:
■ Parsed
■ Found to be a valid SQL construction
■ Run without error as an atomic unit. For example, all rows of a multirow update
are changed.
#解析
#一个可用的SQL结构
#做为一个原子单位无错误运行。比如,多行的所有行被更新生效。
However, until the transaction that contains the statement is committed, the
transaction can be rolled back, and all of the changes of the statement can be undone.
A statement, rather than a transaction, runs successfully.
但是,直到事务中包含的语句提交前,事务可以被回滚,并且语句的所有的改变将徒劳。
一个语句不同于一个事务成功执行。
Committing means that a user has explicitly or implicitly requested that the changes
in the transaction be made permanent. An explicit request occurs when the user issues
a COMMIT statement. An implicit request occurs after normal termination of an
application or completion of a data definition language (DDL) operation. The changes
made by the SQL statement(s) of a transaction become permanent and visible to other
users only after that transaction commits. Queries that are issued after the transaction
commits will see the committed changes.
提交意味着一个用户显式或隐式在事务中的的要求改变变为永久。一个明确发生当用户输入
一个COMMIT语句。一个隐式要求提交发生在一个应用的正常结束或者是DDL操作。事务的
SQL语句的改变变成永久和可见对于其它用户仅当事务提交后。事务提交后查询将可以看到
提交的改变结果。
You can name a transaction using the SET TRANSACTION ... NAME statement before
you start the transaction. This makes it easier to monitor long-running transactions
and to resolve in-doubt distributed transactions.
你可命名一个事务使用SET TRANSACTION...NAME语句在你执行事务前。这使得更容易监控
长运行的事务并且去解决有问题的分布式事务。