BEGIN WORK
Begins a transaction
英文手册覆盖始于 PostgreSQL 6.4. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 6.4·选择有来源记录的版本
此版本暂无所选语言的定义,以下显示原始英文内容。
- anchor
- 未知
- file
- sql-beginwork.htm
- lang
- en
- name
- BEGIN WORK
- purpose
- Begins a transaction
- purpose zh
- 未知
- sections same as
- 未知
- slug
- 6.4
- synopsis html
- BEGIN [ WORK | TRANSACTION ]
- synopsis text
- BEGIN [ WORK | TRANSACTION ]
语法
BEGIN [ WORK | TRANSACTION ]
语法图
从左向右阅读;分支表示选择,旁路表示可选,循环表示重复。点击带下划线的参数可打开对应规则。
版本定义 PG 6.4
BEGIN [ WORK | TRANSACTION ]
Description
BEGIN initiates a user transaction which Postgres will guarantee is serializable with respect to all concurrently executing transactions. Postgres uses two-phase locking to perform this task. If the transaction is committed, Postgres will ensure either that all updates are done or else that none of them are done. Transactions have the standard ACID (atomic, consistent, isolatable, and durable) property.
Notes
The keyword TRANSACTION is just a cosmetic alternative to WORK. Neither keyword need be specified.
Refer to the LOCK statement for further information about locking tables inside a transaction.
Use COMMIT or ROLLBACK to terminate a transaction.
Usage
To begin a user transaction:
BEGIN WORK;
Compatibility
BEGIN is a Postgres language extension.
SQL92
There is no explicit BEGIN WORK command in SQL92; transaction initiation is always implicit and it terminates either with a COMMIT or with a ROLLBACK statement.
比较版本
来源引用
定义来源
center · PostgreSQL 6.4 · b7bd9cda
正文语言: en · b7bd9cda