db.集合名.find( {}, {需要查询的字段:1, _id:0} )
例如
db.userInfo.find({}, {'created_at':1, _id: 0})
默认会显示 _id
1 表示显示此字段
0 表示不显示此字段
db.集合名.find( {}, {需要查询的字段:1, _id:0} )
例如
db.userInfo.find({}, {'created_at':1, _id: 0})
默认会显示 _id
1 表示显示此字段
0 表示不显示此字段
下一篇:pip和pip3如何更新
一、pom依赖<properties> <mongodb.version>3.6.3</mongodb.version></properties><dependencies> <dependency> <groupId>org.mongodb</groupId> <artifact
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M