简单事务演练

select * from th
insert into th (id,name,gender,age) values (1,'honger','nv','20');

begin
  savepoint a;
  insert into th (id,name,gender,age) values (2,'yuer','nv','??');
  savepoint b;
  insert into th (id,name,gender,age) values (3,'jietian','???','???');
  savepoint c;
  insert into th (id,name,gender,age) values (4,'zhumo','???','???');
  rollback to b;
  commit;
end;

 

posted @ 2019-07-22 15:14  织式  阅读(123)  评论(0编辑  收藏  举报