12 2017 档案

摘要:https://brickyang.github.io/2017/03/02/Linux-%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD-MongoDB/ 1、创建备份脚本 /data/backup/mongod.sh #!/bin/shDUMP=mongodump# 临时 阅读全文
posted @ 2017-12-14 10:44 刘镇维 阅读(244) 评论(0) 推荐(0) 编辑
摘要:单字段去重 db.student.distinct("name"); 多字段去重 db.student.aggregate([{ $group:{ _id: {name: "$name", sex: "$sex"}, }}]) 如果还需要拿出collection中的其他字段,可以使用$push关键字 阅读全文
posted @ 2017-12-05 15:50 刘镇维 阅读(4095) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示