在mongodb中,如何删除错过某些字段的所有文档

时间:2016-06-06 19:22:00

标签: mongodb

db.getCollection('db').find({img:{$exists:false}})

很高兴找到我要删除的文件。但是

db.getCollection('db').remove({img:{$exists:false}})

不删除它们: 在70ms内删除了0条记录 为什么?我怎么能做到这一点?

1 个答案:

答案 0 :(得分:-1)

不要使用robomongo ......只是mongo客户端

相关问题