H2 Database 简明教程
H2 Database - Rollback
回滚是 SQL 语法的命令,用于将事务回滚到保存点或前一个事务。通过使用此命令,我们可以回滚到特定保存点,也可以回滚到之前执行的事务。
ROLLBACK is a command from the SQL grammar used to roll back the transaction to a Savepoint or to the previous transaction. By using this command, we can either roll back to the specific Savepoint or we can roll back to the previous executed transaction.
Syntax
ROLLABCK 命令有两种不同的语法。
There are two different syntaxes for ROLLABCK command.
以下是对回滚命令的通用语法。
Following is the generic syntax for the rollback command.
ROLLBACK [ TO SAVEPOINT savepointName ]
以下是回滚命令的通用语法,适用于特定事务。
Following is the generic syntax of the Rollback command to the specific transaction.
ROLLBACK TRANSACTION transactionName