How to Find Documents in MongoDb where some fields are not null -


How to obtain a list of documents in Mongode where some fields are not zero.

: If a student is not enrolled in name or age or course which should not be in the results collection.

This should work:

  db.student.find ( {'Name': {$ Ne: null}, 'course': {$ ne: null}, 'age': {$ ne: null}})  

But as @ Bipal said that there is no need to store any empty space; Value schema in the form of mongodibi is less; this query is not included outside of the result; all these areas have such documents.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -