第二章 SQL命令参考-ROLLBACK

来源:互联网 发布:iphone翻墙用什么软件 编辑:程序博客网 时间:2024/06/15 21:57

ROLLBACK

Aborts the current transaction.

概要

ROLLBACK [WORK| TRANSACTION]

描述

rollback rolls back the current transaction andcauses all the updates made by the transaction to be discarded.

parameter

WORK

TRANSACTION

Optional keywords. They have no effect.

Notes

Use commit to successfully end the currenttransaction.

Issuing rollback when not inside a transaction does noharm, but it will provoke a warning message.

使用COMMIT成功地结束当前的事务。

发出ROLLBACK当一个事务里面没有没有任何伤害,但它会产生一个警告信息。

示例

To discard allchanges made in the current transaction:

ROLLBACK;

兼容性

The SQLstandard only specifies the two forms ROLLBACK and ROLLBACK WORK. Otherwise, this command is fullyconforming.

相关参考

BEGIN, COMM^IT, SAVEPOINT, ROLLBACK TO SAVEPOINT