Savepoint
savepoint是在数据库事务处理中实现“子事务”(subtransaction),也称为嵌套事务的方法。事务可以回滚到savepoint而不影响savepoint创建前的变化。不需要放弃整个事务。
SQL语言国际标准中,SAVEPOINT name
语句声明一个savepoint。ROLLBACK TO SAVEPOINT name
语句回滚到savepoint。RELEASE SAVEPOINT name
将使得命名的savepoint被放弃,但不影响其他savepoint。ROLLBACK
或COMMIT
导致所有savepoint被放弃。
支持savepoint的数据库有:PostgreSQL、Oracle数据库、Microsoft SQL Server、MySQL、DB2、SQLite(从3.6.8)、Firebird、H2数据库、Informix(从11.50xC3)。
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.