分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
回话级关闭自动提交mysql> set autocommit=off;Query OK, 0 rows affected (0.00 sec)mysql> show variables like 'autocommit';+---------------+-------+| Variable_name | Value |+---------------+-------+| autocommit | OFF |+---------------+-------+1 row in set (0.00 sec)回话1:mysql> desc t1 -> ;+-------+---------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+-------+---------+------+-----+---------+-------+| id | int(11) | YES | | NULL | |+-------+---------+------+-----+---------+-------+1 row in set (0.00 sec)mysql> select * from t1;+------+| id |+------+| 1 |+------+1 row in set (0.00 sec)mysql> insert into t1 values(2);Query OK, 1 row affected (0.01 sec)mysql> select * from t1;+------+| id |+------+| 1 || 2 |+------+2 rows in set (0.00 sec)回话2:mysql> select * from t1;+------+| id |+------+| 1 |+------+1 row in set (0.00 sec)可以看到此时关闭自动提交已经生效mysql> select * from t1;+------+| id |+------+| 1 || 2 |+------+2 rows in set (0.00 sec)mysql> rollback;Query OK, 0 rows affected (0.06 sec)mysql> select * from t1;+------+| id |+------+| 1 |+------+1 row in set (0.00 sec)