1 开始事务begin;
2 提交事务commit;
3 回滚(撤销)事务rollback;
4 代码
update student set userName='流氓+渣男' where id=5;
begin;
update student set userName='流氓da渣男' where id=5;
select * from student where id=5;
update student set userName='独臂大傻雕渣男' where id=4;
select * from student where id=4;
rollback;
commit;
5 效果图