上一页 1 ··· 7 8 9 10 11 12 13 14 下一页
摘要: 1,进入MySQL目录下 2对新用户进行增删改 2.1 创建用户 create user "用户名"@"IP地址" identified by '密码' 192.168.1.% 指定这个网段的任何人 , '用户名'@'%'所有IP地址 2.2 删除用户 drop user '用户名'@'IP地址' 阅读全文
posted @ 2019-01-24 20:44 充电宝宝 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 聚集索引 primary key 唯一索引 unique 普通索引 alter table t1 all index index_name(id) 索引的作用是加速查找 覆盖索引: select name from t1 where id = 20 命中了辅助索引但是为覆盖到索引 还需要从聚集索引中 阅读全文
posted @ 2019-01-24 20:28 充电宝宝 阅读(966) 评论(0) 推荐(0) 编辑
摘要: 用处 ; 防止用户利用特殊符号来进行非法登录 uname = input() upwd = input() sql = select * from userinfo where user= %s and upwd=%s res = cursor.execute(sql,[uname,upwd]))# 阅读全文
posted @ 2019-01-24 20:16 充电宝宝 阅读(148) 评论(0) 推荐(0) 编辑
摘要: import pymysql # 需要用PIP 安装这个库 conn = pymysql.connect( host= '127.0.0.1' , user= 'root'#用户名 password = ''#填密码 database='crm'#库名 ,charset='utf8'#不能使utf- 阅读全文
posted @ 2019-01-24 20:02 充电宝宝 阅读(79) 评论(0) 推荐(0) 编辑
摘要: select * from t1,t2 笛卡尔积 select * from t1 inner join t2 on t1.id = t2.cid where 条件 inner join 显示两个表匹配上的相同的数据 left join 显示左边表的所有数据 右边没有的以null补充 right j 阅读全文
posted @ 2019-01-24 19:52 充电宝宝 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1 from 2 where 3 group by 4 having 5select 6distinct 7 order by 8 limit sum 求和 avg平均值 max最大 min最小 in not in count次数 group_coucat 分组后显示所有内 between 100 阅读全文
posted @ 2019-01-24 19:44 充电宝宝 阅读(443) 评论(0) 推荐(0) 编辑
摘要: primary key 主键 notnull 不为空 unique 唯一 foreign key(外键) references t1(id) auto_increment 递增,数字必须为整数 字段的增删改查 : 增 insert into t1 values(XX) 删delete from t1 阅读全文
posted @ 2019-01-24 19:36 充电宝宝 阅读(225) 评论(0) 推荐(0) 编辑
摘要: import gevent,threading from gevent import monkey;monkey.patch_all def f1(); print('第一次') time.sleep(2) print('第二次') def f2(): print(第一次f2) time.sleep 阅读全文
posted @ 2019-01-24 19:16 充电宝宝 阅读(117) 评论(0) 推荐(0) 编辑
摘要: from threading import Thread,Event from multiprocessing import Process,Event e = Event()#将事件实例化 e.set() 将Event 的状态改为True e.clear() 将Event的状态改为FALSE e. 阅读全文
posted @ 2019-01-24 19:09 充电宝宝 阅读(101) 评论(0) 推荐(0) 编辑
摘要: import queue# 一:先进先出队列# q = queue.Queue(3) #先进先出 fifo first in first out# q.put(1)# q.put(2)# # print('当前队列内容长度',q.qsize())# q.put(3)# print('查看队列是否满了 阅读全文
posted @ 2019-01-24 19:03 充电宝宝 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页