2020年1月17日
摘要: 1、查找表中多余的重复记录,重复记录是根据单个字段(Id)来判断 select * from 表 where Id in (select Id from 表 group byId having count(Id) > 1) 2、删除表中多余的重复记录,重复记录是根据单个字段(Id)来判断,只留有ro 阅读全文
posted @ 2020-01-17 15:52 xibuhaohao 阅读(2496) 评论(0) 推荐(0) 编辑
摘要: sql 查出一张表中重复的所有记录数据 1.表中有id和name 两个字段,查询出name重复的所有数据 ? 1 select * from xi a where (a.username) in (select username from xi group by username having co 阅读全文
posted @ 2020-01-17 15:43 xibuhaohao 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 例如有以下集合users: { "_id" : 1, "openid" : "ojQrH5X-V1asIS7uAk2iL-m6azro" },{ "_id" : 2, "openid" : "ojQrH5dwrqiv3O4zgZLWp43dBAa4" },{ "_id" : 3, "openid" 阅读全文
posted @ 2020-01-17 15:39 xibuhaohao 阅读(4294) 评论(0) 推荐(0) 编辑
摘要: python报错:pymongo.errors.CursorNotFound: Cursor not found 背景: 从数据库中取得所有数据 db['test'].find({},{_id:0}),然后对结果进行for循环 demos = db['demo'].find({},{"_id": 0 阅读全文
posted @ 2020-01-17 15:19 xibuhaohao 阅读(461) 评论(0) 推荐(0) 编辑