yangyi
项目合作联系我: yangyi_love@hotmail.com

导航

 

START TRANSACTION(或者begin);
  SAVEPOINT point1;
  if  ???? then
    ROLLBACK TO SAVEPOINT point1;

 #(回滚到SAVEPOINT处)
  else
  .......
  end if;

  COMMIT;(必须,否则会引起Lock wait timeout exceeded; try restarting transaction的错误,并导致所操作的表被死锁)

posted on 2010-05-27 13:10  谁是菜鸟?  阅读(403)  评论(0编辑  收藏  举报