Statement Execution and Transaction Control【每日一译】--2012-11-04

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语句在你执行事务前。这使得更容易监控

长运行的事务并且去解决有问题的分布式事务。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值