标签:
select * from student;update student set sex = ‘人‘ where stuNo = ‘00011‘;commit;rollback; -- 回滚至上一commit之后show autocommit; -- 默认offset autoCommit on;set autoCommit off;create table AA(AA char(10)); -- 隐式commitselect * from bankcount;-- 多条语句 事务update bankcount set money = money - 10000 where countno = ‘110 000 2000 888‘;update bankcount set money = money + 10000 where countno = ‘110 000 2000 889‘;rollback;commit;-- rollback 定义保存点 savePoint;SAVEPOINT aa;update bankcount set money = money + 10000 where countno = ‘110 000 2000 888‘;SAVEPOINT bb;update bankcount set money = money - 10000 where countno = ‘110 000 2000 889‘;rollback to bb; -- 回滚之保存点之后commit;
标签:
原文地址:http://www.cnblogs.com/jarl/p/5892887.html