标签:
?$exists:判断字段是否存在;1,查询所有存在name字段的记录db.users.find({name: {$exists: true}});
2,查询所有不存在phone字段的记录db.users.find({phone: {$exists: false}});?
mongodb $exists
原文地址:http://my.oschina.net/u/563488/blog/514919