首页 > 数据库技术 > 详细

mysql 事务回滚

时间:2017-03-01 16:09:09      阅读:247      评论:0      收藏:0      [点我收藏+]

begin
declare t_error integer default 0;
declare continue handler for sqlexception set t_error=1;

#set autocommit =0;
start transaction;
update mol_userlevelright set UserSetValue=20 where id=9;
if t_error = 1 then
rollback;
else
commit;
select 1;
end if;
end

mysql 事务回滚

原文:http://www.cnblogs.com/makqiq/p/6484567.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!