2020年4月30日
摘要: -- start transaction 开启事务 -- Rollback 回滚事务,即撤销指定的sql语句(只能回退insert delete update语句),回滚到上一次commit的位置 -- Commit 提交事务,提交未存储的事务 -- -- savepoint 保留点 ,事务处理中设 阅读全文
posted @ 2020-04-30 16:18 -脑子坏了- 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import pymysql conn = pymysql.connect(host='127.0.0.1',port=3306,user='root',\ passwd='123456',db='lesson54') cursor = conn.cursor(cursor=pymysql.curs 阅读全文
posted @ 2020-04-30 15:49 -脑子坏了- 阅读(138) 评论(0) 推荐(0) 编辑
摘要: (1)直接创建索引 CREATE INDEX index_name ON table(column(length)) CREATE UNIQUE INDEX zipindex on ec_address(FIRST_LETTER(3)) mysql> create index index_name 阅读全文
posted @ 2020-04-30 14:36 -脑子坏了- 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 创建两张表 mysql> create table employee( -> emp_id int auto_increment primary key not null, -> emp_name varchar(50), -> age int, -> dept_id int -> ); mysql 阅读全文
posted @ 2020-04-30 09:45 -脑子坏了- 阅读(1796) 评论(0) 推荐(0) 编辑