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# 临时
阅读全文
摘要:单字段去重 db.student.distinct("name"); 多字段去重 db.student.aggregate([{ $group:{ _id: {name: "$name", sex: "$sex"}, }}]) 如果还需要拿出collection中的其他字段,可以使用$push关键字
阅读全文