我了解 Oracle
SQL 中的保存点
标识事务中的一个点,您稍后可以回滚
。
所以从技术上讲,如果我现在创建一个保存点
并在数据库上执行 100 次操作,我可以回滚
到这 100 次操作之前。
但如果现在我不想跟踪我的更改并删除保存点怎么办?
谢谢
最佳答案
正如 a_horse_with_no_name 评论的那样, Oracle 中没有删除保存点的语法。
当您COMMIT
或ROLLBACK
事务时,保存点会自动删除。
来自 the Oracle docs on Transaction Control :
The
COMMIT
statement ends the current transaction and makes all changes performed in the transaction permanent.COMMIT
also erases all savepoints in the transaction and releases transaction locks.The
ROLLBACK
statement reverses the work done in the current transaction; it causes all data changes since the lastCOMMIT
orROLLBACK
to be discarded.
您可能还想修改代码以不创建保存点。
关于sql - 删除 ORACLE 服务器中的保存点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54688106/