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

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -