mongdb去重

db.collectionName.distinct(field,query,options)

field -----指定要返回的字段(string)

query-----条件查询(document)

options-----其他的选项(document)

db.collectionName.distinct("phone",{"name": 测试,"sex":'女'})

posted @ 2022-04-22 17:20  人鱼小丑  阅读(36)  评论(0)    收藏  举报