Begin         -- 事务开启

insert ...

update ...

Save point pointA;       -- 保存点A,名字随便取

insert ...

update ...

Save point pointB;        -- 保存点B,名字随便取

Rollback to pointA;        -- 回滚至保存点A

Rollback;                       -- 全部回滚

Commit;

 

隐式提交被触发场景:

在一个会话里面,当执行 DDL SQL 比如 grant , delete table, alter table等待操作时,会直接触发commit;操作,而不用显式使用commit语句。

当一个事务begin开启之后,commit之前,如果又写了一个begin,那么在第一个begin和第二个begin之间的所有数据也会被隐式提交。

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2021-09-15
  • 2022-12-23
  • 2022-02-15
  • 2022-01-21
  • 2022-12-23
猜你喜欢
  • 2021-09-28
  • 2022-02-09
  • 2022-02-09
  • 2022-02-09
  • 2021-12-05
  • 2021-06-13
  • 2022-12-23
相关资源
相似解决方案