How to check if a field is not null in mongodb?
beginer
1544
Points
52
Posts
|
Answers
Smith
2890
Points
78
Posts
|
Use following to get all documents with both a key called "myfield" and a non-null value:
Use following to get all documents with a key called "myfield", but they may still have a null value:
Reference: https://docs.mongodb.com/manual/tutorial/query-for-null-fields/
Posted On:
04-Mar-2022 02:15
|
Blog
Active User (0)
No Active User!