MySQL事务回滚rollback与提交commit的操作

1.     >D:

2.    >cd program files\mysql\bin

3.    >mysql -uroot -p123456

4.    >show databases;

5.    >use xscj;

6.    >show tables;

7.    >select * from city;

8.    >select @@autocommit;

9.    >set autocommit=0;

10.  >insert into city(id,name) values('wx','无锡');

11.  >select * from city;

12.  >rollback;

13.  >select * from city;

14.  >insert into city(id,name) values('wx','无锡');

15.  >commit;

16.  >rollback;

17.  >select * from city;

 command命令操作步奏图:
MySQL事务回滚rollback与提交commit的操作_第1张图片 

你可能感兴趣的:(数据库)