MongoDB数据库中remove的整理与总结
删除整个集合中的所有数据
db.test.remove()
删除集合中符合过滤条件的数据
db.test.remove({ name:/aws/})
删除符合条件的一条记录
db.test.remove({ name:/aws/},1)
或者
db.test.remove({ name:/aws/},{ justOne:true})
参考文章
- https://jspang.com/detailed?id=36
- https://www.jianshu.com/p/fffb581bb1a9
原文链接:https://blog.csdn.net/weixin_39893889/article/details/103976276
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~