跳至内容
Main menu
Main menu
move to sidebar
hide
Navigation
Main Page
Help
Browse
Cookbook
Wikijunior
Featured books
Recent changes
Random book
Using Wikibooks
Community
Reading room forum
Community portal
Bulletin Board
Help out!
Policies and guidelines
Contact us
Search
Search
Donations
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Discussion for this IP address
内容
移动到侧边栏
隐藏
开始
1
事务
切换目录
SQL 方言参考/事务
Add languages
Add links
Book
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Sister projects
Wikipedia
Wikiversity
Wiktionary
Wikiquote
Wikisource
Wikinews
Wikivoyage
Commons
Wikidata
MediaWiki
Meta-Wiki
Print/export
Create a collection
Download as PDF
Printable version
In other projects
外观
移动到侧边栏
隐藏
来自维基教科书,开放的书籍,开放的世界
<
SQL 方言参考
事务
[
编辑
|
编辑源代码
]
此页面包含
比较表
,它们可能
很大且复杂
。
虽然完全可以以完整状态查看它们,但建议安装一个
比较表扩展
,它可以允许选择特定列进行比较。
SQL 版本
功能
标准
SQL:2011
DB2
Firebird
Ingres
Linter
MSSQL
MySQL
Vers. 5.x
MonetDB
Oracle
Vers. 11.x
PostgreSQL
SQLite
Virtuoso
?
开始
START TRANSACTION
[事务特性]
隐式
SET TRANSACTION
?
?
BEGIN TRAN[SACTION]
BEGIN [WORK]
START [TRANSACTION]
START TRANSACTION
BEGIN TRANSACTION
隐式
BEGIN [WORK|TRANSACTION]
START TRANSACTION
BEGIN [TRANSACTION]
隐式
?
提交
COMMIT [WORK]
COMMIT [WORK]
COMMIT [WORK]
[EXEC SQL] COMMIT [WORK]
?
COMMIT [WORK]
COMMIT TRAN[SACTION] [transaction_name]
COMMIT [WORK]
COMMIT [WORK] [AND [NO] CHAIN]
COMMIT [WORK]
COMMIT [WORK|TRANSACTION]
COMMIT [TRANSACTION]
END [TRANSACTION]
COMMIT WORK
?
回滚整个事务
ROLLBACK [WORK]
ROLLBACK [WORK]
ROLLBACK [WORK]
[EXEC SQL] ROLLBACK [WORK]
?
ROLLBACK [WORK]
ROLLBACK TRAN[SACTION]
ROLLBACK [WORK]
ROLLBACK [WORK] [AND [NO] CHAIN]
ROLLBACK [WORK]
ROLLBACK [WORK|TRANSACTION]
ROLLBACK [TRANSACTION]
ROLLBACK WORK
?
在事务中定义一个保存点
x
SAVEPOINT
x
SAVEPOINT
x
ON ROLLBACK RETAIN CURSORS
SAVEPOINT
x
SAVEPOINT
x
?
SAVE TRAN[SACTION]
x
SAVEPOINT
x
SAVEPOINT
x
SAVEPOINT
x
SAVEPOINT
x
SAVEPOINT
x
N/A
?
回滚到给定的保存点
x
ROLLBACK [WORK] TO SAVEPOINT
x
ROLLBACK [WORK] TO SAVEPOINT
x
ROLLBACK [WORK] TO [SAVEPOINT]
x
[EXEC SQL] ROLLBACK [WORK] TO
x
?
ROLLBACK TRAN[SACTION]
x
ROLLBACK [WORK] TO [SAVEPOINT]
x
ROLLBACK [WORK] [AND [NO] CHAIN] TO SAVEPOINT
x
ROLLBACK [WORK] TO [SAVEPOINT]
x
ROLLBACK [WORK|TRANSACTION] TO [SAVEPOINT]
x
ROLLBACK [TRANSACTION] TO [SAVEPOINT]
x
N/A
?
释放(忘记)保存点
x
RELEASE SAVEPOINT
x
RELEASE [TO] SAVEPOINT
x
RELEASE SAVEPOINT
x
N/A
?
N/A
RELEASE SAVEPOINT
x
RELEASE SAVEPOINT
x
N/A
RELEASE [SAVEPOINT]
x
RELEASE [SAVEPOINT]
x
N/A
?
为两阶段提交准备名为
id
的事务
?
?
N/A
?
?
?
?
N/A
?
PREPARE TRANSACTION
id
N/A
?
?
提交名为
id
的已准备事务
?
?
N/A
?
?
?
?
N/A
?
COMMIT PREPARED
id
N/A
?
?
回滚名为
id
的已准备事务
?
?
N/A
?
?
?
?
N/A
?
ROLLBACK PREPARED
id
N/A
?
开始
提交
回滚
准备
执行已准备好的
Linter
隐式
执行一个
COMMIT
语句
执行任何 DDL 语句
在 AUTOCOMMIT 模式下执行任何语句
执行一个
ROLLBACK
语句
用户进程异常终止或在没有
COMMIT/ROLLBACK
的情况下断开连接
?
?
类别
:
书籍:SQL 方言参考
华夏公益教科书