12 2017 档案
摘要:https://brickyang.github.io/2017/03/02/Linux-%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD-MongoDB/ 一、备份与还原 1、备份 备份到文件夹mongodump -u **用户名** -p **密码** -o **输出文件
阅读全文
摘要:单字段去重 db.student.distinct("name"); 多字段去重 db.student.aggregate([{ $group:{ _id: {name: "$name", sex: "$sex"}, }}]) 如果还需要拿出collection中的其他字段,可以使用$push关键字
阅读全文
浙公网安备 33010602011771号