#作用 获取集合中指定字段的不重复值,并以数组的形式返回 #语法
db.collection_name.distinct(field,query,options)
field:指定返回的字段(string) query:条件查询(document) option:其他的选项(document),查看options
举例:
MongoDB中distinct的用法
原文:https://www.cnblogs.com/whiteBear/p/12744890.html