robbiblubber.org

help | login | search:  
>>

read  source  history 


= remove() =
----
[[MongoDB Driver Function Reference]]


Deletes documents from a collection that meet the filter criteria.
More information can be found in the corresponding entry of the [[https://docs.mongodb.com/manual/reference/method/db.collection.remove/index.html|MongoDB Manual]].


[[[@cG

<collection>.remove(<filter>[, <one>])

]]]


**Arguments**

[[[@w

|@t0@r0@c0 <collection> | | The target collection. |
| <filter> | | A filter expression using [[https://docs.mongodb.com/manual/reference/operator/|query operators]]. |
| <one> | | A Boolean specifying if only one document will be removed. |

]]]


**Example**

[[[@cw

db.employees.remove({ salary: { $gt: 700000 }});

]]]

Deletes all documents from the employee collection with a salary greater than 700000.



----
[[Main|home]] | [[MongoDB Driver Function Reference]] | [[MongoDB Driver]]