Savepoint
Sign in to saveA savepoint is a way of implementing subtransactions (also known as nested transactions) within a relational database management system by indicating a point within a transaction that can be "rolled back to" without affecting any work done in the transaction before the savepoint was created. Multiple savepoints can exist within a single transaction. Savepoints are useful for implementing complex error recovery in database applications. If an error occurs in the midst of a multiple-statement transaction, the application may be able to recover from the error (by rolling back to a savepoint) with
Article · 中文
savepoint是在数据库事务处理中实现“子事务”(subtransaction),也称为的方法。事务可以回滚到savepoint而不影响savepoint创建前的变化。不需要放弃整个事务。 SQL语言国际标准中,SAVEPOINT <i>name</i>语句声明一个savepoint。ROLLBACK TO SAVEPOINT <i>name</i>语句回滚到savepoint。RELEASE SAVEPOINT <i>name</i>将使得命名的savepoint被放弃,但不影响其他savepoint。ROLLBACK或COMMIT导致所有savepoint被放弃。 支持savepoint的数据库有:PostgreSQL、Oracle数据库、Microsoft SQL Server、MySQL、DB2、SQLite(从3.6.8)、Firebird、H2数据库、(从11.50xC3)。
Abstract from DBpedia / Wikipedia · CC BY-SA