mongodb select field

相關問題 & 資訊整理

mongodb select field

Parameter, Type, Description. query, document, Optional. Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ( } ). projection, document, Optional. Specifies the fields t, Please take a look at the documentation. You will notice that find it has an optional second parameter called "projection". This parameter is used to state which fields you want. To get only the field named "email", use this projectio, The field selector always pulls back _id unless you specifically turn it off: db.collection.find(}, _id: 0}). However, Mongo will not check for field existence by default. If you want to select certain fields, and match only results that have those field,Projection Document; Example Collection; Return All Fields in Matching Documents; Return the Specified Fields and the _id Field Only; Return Specified Fields Only; Return All But the Excluded Field; Return Specific Fields in Embedded Documents; Suppress S

相關軟體 MongoDB 資訊

MongoDB
MongoDB 是一個免費且開放源碼的跨平檯面向文檔的數據庫程序。分類為 NoSQL 數據庫程序,MongoDB 使用類似 JSON 的文檔與模式。它為使用 MongoDB 包括數據庫開發人員和 DBA 的任何人提供了豐富的 GUI 工具。主要功能包括:全功能嵌入 MongoDB Shell,用戶友好的 Map-Reduce 操作編輯器,創建 / 刪除數據庫,管理集合及其索引的能力,用戶友好的 G... MongoDB 軟體介紹

mongodb select field 相關參考資料
db.collection.find() — MongoDB Manual 3.6 - MongoDB Documentation

Parameter, Type, Description. query, document, Optional. Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ( } )....

https://docs.mongodb.com

mongodb - mongo .find return specific field only for all user ...

Please take a look at the documentation. You will notice that find it has an optional second parameter called "projection". This parameter is used to state which fields you want. To get onl...

https://stackoverflow.com

MongoDB Database, equivalent for SELECT column1, column2 FROM tbl ...

The field selector always pulls back _id unless you specifically turn it off: db.collection.find(}, _id: 0}). However, Mongo will not check for field existence by default. If you want to select certa...

https://stackoverflow.com

Project Fields to Return from Query — MongoDB Manual 3.2

Projection Document; Example Collection; Return All Fields in Matching Documents; Return the Specified Fields and the _id Field Only; Return Specified Fields Only; Return All But the Excluded Field; R...

https://docs.mongodb.com