MongoDB equivalent of SQL "OR" -
Therefore, finding the MongoDB records is the default for "AND". For example:
db.users.find ({age: {'$ gte': 30}, {'$ lte': 40}});
Finds the above queries users> = 30 and & lt; = 40 years old.
How do I find a user & lt; = 30 OR > = 40 years old?
There will be one or the operator near future At night the Mongodb build is already $ or you can use $ and use javascript or you can use it or
view
Comments
Post a Comment