![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
文章平均质量分 53
aony.work
这个作者很懒,什么都没留下…
展开
-
mysql事务 savepoint rollback
innodb 引擎才支持事务开启事务之前 先要关闭自动提交mysql> set autocommit=0; 关闭事务自动提交alter table 表名 engine = innodb ; 修改表的引擎delete from t1; 比如清空表t1的内容rollback; 回退上一步操作如:insert into t1(id,name) values (9,'...原创 2018-12-19 14:18:35 · 672 阅读 · 0 评论 -
mysql触发器 trigger
mysql>\d // #语句结束符号create trigger tone before insert on 表名1 for each row #创建一个触发器在表插入一条语句之前执行下面操作begin #开始insert into 表名2(name)values(new.name); #new.name 获取的是往表1加入的值nameend // #...原创 2018-12-19 19:04:03 · 161 阅读 · 0 评论 -
python操作mysql
安装pymysql第一种:pip install pymysql第二种:apt-get install git git clone https://github..com/PyMySQL/PyMySQL.git cd PyMySQL python setup.py install连接数据库...原创 2018-12-19 19:42:34 · 85 阅读 · 0 评论