MongoDB之数据查询(字段判断)

使用“$exists”能够判断某个字段是否存在,若是设置为true表示存在,若是随着为false表示不存在。 范例:查询有parents人员的信息 > db.emp.find({"parents":{"$exists":true}}).pretty(); {         "_id" : ObjectId("599148bd0184ff511bf02b91"),         "name" :
相关文章
相关标签/搜索