📜  mongodb 选择所有不为空的文本 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:56.198000             🧑  作者: Mango

代码示例1
//This will return all documents with a key called "IMAGE URL", but they may still have a null value.
db.mycollection.find({"IMAGE URL":{$exists:true}});

//This will return all documents with both a key called "IMAGE URL" and a non-null value.
db.mycollection.find({"IMAGE URL":{$ne:null}});