mysql创建还原点

set autocommit = 0;
 
insert into t1(name) values ("user1");
savepoint p1;
 
insert into t1(name) values("user2");
 
svaepoint p2;
 
insert into t1(name) values("user3");
 
savepoint p3;
 
rollback to p2;
 
//结果是user3数据插入失败
posted @ 2015-05-21 22:07  北京流浪儿  阅读(570)  评论(0编辑  收藏  举报