Fixed 3rd query, added or thingy.
This commit is contained in:
parent
86ba61f9c3
commit
ff283c93df
@ -118,9 +118,11 @@ db.Employee.updateOne(
|
||||
3. Selects all documents in the collection where the field age has a value less than 30 or the value of the salary field is greater than 40000.
|
||||
```json
|
||||
db.Employee.find(
|
||||
{
|
||||
Age: { $lt: 30 },
|
||||
Salary: { $gt: 40000 }
|
||||
{ $or:
|
||||
[
|
||||
{ Age: { $lt: 30 } },
|
||||
{ Salary: { $gt: 40000 } }
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
@ -155,3 +157,4 @@ db.Employee.find(
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user