ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle savepoint

oracle savepoint

原创 Linux操作系统 作者:treesofthehill 时间:2012-10-15 10:58:30 0 删除 编辑

The SAVEPOINT statement names and marks the current point in the processing of a transaction.

Usage Notes

A simple rollback or commit erases all savepoints. When you roll back to a savepoint, any savepoints marked after that savepoint are erased. The savepoint to which you roll back remains.

You can reuse savepoint names within a transaction. The savepoint moves from its old position to the current point in the transaction.

If you mark a savepoint within a recursive subprogram, new instances of the SAVEPOINT statement are executed at each level in the recursive descent. You can only roll back to the most recently marked savepoint.

An implicit savepoint is marked before executing an INSERT, UPDATE, or DELETE statement. If the statement fails, a rollback to the implicit savepoint is done. Normally, just the failed SQL statement is rolled back, not the whole transaction; if the statement raises an unhandled exception, the host environment (such as SQL*Plus) determines what is rolled back.

参考:

SAVEPOINT Statement http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/savepoint_statement.htm 

Using SAVEPOINT With ROLLBACK http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/sqloperations.htm#BABGAAIG

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9537053/viewspace-746422/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-11

  • 博文量
    97
  • 访问量
    178958