Mongodb 查询存在 XX 字段的记录,删除某个列
2016-02-19 18:39
711 查看
查询存在 xx 字段的记录
查询不存在 xx 字段的记录
删除某个或多个列、内嵌数组内的字段
db.good.find({"goodId": { $exists: true }})
查询不存在 xx 字段的记录
db.good.find({"textureName": { $exists: false }})
删除某个或多个列、内嵌数组内的字段
db.good.update({},{$unset:{"textureName":""}},{multi:true}) db.good.update({},{$unset:{"textureName":"","describe":""}},{multi:true}) db.stu.update({},{$unset:{"addr.state":""}},{multi:true})
相关文章推荐
- spark连接mongodb
- MongoDB Java使用指南
- mongodb 常用命令
- MongoDB:逐渐变得无关紧要
- MongoDB学习笔记-维护
- MongoDB固定集合
- CentOS 6.5下通过yum安装MongoDB记录
- MongoDB 聚合查询
- MongoDB 正则表达式
- MongoDB分片(Sharding)集群(Cluster)
- MongoDB Replication(主从互备)
- MongoDB学习笔记-命令
- MongoDB Java Driver 使用
- logback的mongodb扩展
- mongodb文档查询地址
- 【Mongodb】3.0 配置身份验证db.createUser()说明
- MongoDB Map Reduce
- MongoDB 概要(Overview)
- MongoDB学习笔记-基础概念
- 【Linux运维入门】Linux环境安装配置MongoDb及简单使用